diff --git a/MediaStatus.php b/MediaStatus.php new file mode 100644 index 0000000..5adf0b8 --- /dev/null +++ b/MediaStatus.php @@ -0,0 +1,30 @@ + "0") { +$CPAdults = json_decode(file_get_contents("http://$base:$cpadults/api/$CPAdultsAPI/movie.list/?limit_offset=1"), TRUE); + } +if ($cpkidsvisible > "0") { +$CPKids = json_decode(file_get_contents("http://$base:$cpkids/api/$CPKidsAPI/movie.list/?limit_offset=1"), TRUE); +} +if ($sickvisible > "0") { +$SickBeard = json_decode(file_get_contents("http://$base:$sickport/api/$SICKAPI/?cmd=shows.stats"), TRUE); +} + +if ($sickvisible > "0") { +echo " | "; +echo "TV Shows: "; echo $SickBeard["data"]["shows_total"]; +echo " | "; +echo "Episodes: "; echo $SickBeard["data"]["ep_total"]; +echo " | "; + } +if ($cpadultsvisible > "0") { +echo "Adult Movies: "; echo $CPAdults["total"]; +echo " | "; + } +if ($cpkidsvisible > "0") { +echo "Kids Movies: "; echo $CPKids["total"]; +echo " | "; +} +?> + + diff --git a/Update.bat b/Update.bat index 4e19c7e..892a962 100644 --- a/Update.bat +++ b/Update.bat @@ -277,6 +277,27 @@ findstr "widgetcolour" config.php >nul 2>&1 goto END :END + rem API +findstr "API" config.php >nul 2>&1 + if errorlevel 1 goto ONE + if errorlevel 0 goto ZERO + goto END + :ZERO + echo APIs Already Updated + goto END + :ONE + echo ^>config.php + echo //// MediaStatus >> config.php + echo $MStatusEnabled = "0"; >> config.php + echo $SICKAPI = ""; >> config.php + echo $CPAdultsAPI = ""; >> config.php + echo $CPKidsAPI = ""; >> config.php + echo //// >> config.php + echo ^?^> >> config.php + echo APIs Updated + goto END + :END + rem Update Version findstr "localversion" config.php >nul 2>&1 diff --git a/config/set1.php b/config/set1.php index 826b7c6..b73bb25 100644 --- a/config/set1.php +++ b/config/set1.php @@ -36,6 +36,7 @@ Konvos Widget Enabled: "0") echo "checked=checked; "; ?> />

Enable Kodi (MovieLib): "0") echo "checked=checked; "; ?> />
+ Kodi Libary Stats: "0") echo "checked=checked; "; ?> />

Show Version : "0") echo "checked=checked; "; ?> /> ()

diff --git a/config/set2.php b/config/set2.php index 76040f9..db4d97b 100644 --- a/config/set2.php +++ b/config/set2.php @@ -48,6 +48,7 @@ global $sabpicname; Sick Type : >SickBeard / "1") echo "checked=checked; "; ?>>SickRage
Sick Port:
Sick Name:
+ Sick API:
Sick Pic:'."\n". @@ -68,12 +69,14 @@ global $sickpicname; } ?> +
Couch Enabled: "0") echo "checked=checked; "; ?> />
Couch Adults : "0") echo "checked=checked; "; ?>>Enabled / >Disabled
Couch Adults Port:
Couch Adults Name:
+ Couch Adults API:
Couch Adults Pic: '."\n". @@ -97,6 +100,7 @@ global $cpadultspicname; Couch Kids : "0") echo "checked=checked; "; ?>>Enabled / >Disabled
Couch Kids Port:
Couch Kids Name:
+ Couch Kids API:
Couch Kids Pic: '."\n". diff --git a/config/write1.php b/config/write1.php index 49e30ae..58b3d6f 100644 --- a/config/write1.php +++ b/config/write1.php @@ -17,6 +17,7 @@ $customwidgetbackgroud1 = $_POST['customwidget']; $widgetbackgroudcolour1 = $_POST['widgetbackgroudcolour']; $KWorldEnabled1 = $_POST['kworldenabled']; $widgetcolor1 = $_POST['widgetcolor']; +$MStatusEnabled1 = $_POST['MStatusEnabled']; // $fl='../config.php'; @@ -73,6 +74,12 @@ $content = preg_replace( '/\$widgetcolour = \"(.*?)\";/', '$widgetcolour = "#' } else { $content = preg_replace( '/\$kodivisible = \"(.*?)\";/', '$kodivisible = "1";', $content); } + // mediaStatus Settings + if (empty($MStatusEnabled1)) { + $content = preg_replace( '/\$MStatusEnabled = \"(.*?)\";/', '$MStatusEnabled = "0";', $content); + } else { + $content = preg_replace( '/\$MStatusEnabled = \"(.*?)\";/', '$MStatusEnabled = "1";', $content); + } // Widget Config if (empty($widgetbackgroud1)) { $content = preg_replace( '/\$widgetbackgroud = \"(.*?)\";/', '$widgetbackgroud = "0";', $content); diff --git a/config/write2.php b/config/write2.php index e61509e..bdb683d 100644 --- a/config/write2.php +++ b/config/write2.php @@ -17,6 +17,9 @@ $cpkidsvisible1 = $_POST['cpkidsvisible']; $cpkidsname1 = $_POST['cpkidsname']; $cpkidspicname1 = $_POST['cpkpic']; $cpkids1 = $_POST['cpkids']; +$SICKAPI1 = $_POST['SICKAPI']; +$CPAdultsAPI1 = $_POST['CPAdultsAPI']; +$CPKidsAPI1 = $_POST['CPKidsAPI']; // $fl='../config.php'; /*read operation ->*/ $tmp = fopen($fl, "r"); $content=fread($tmp,filesize($fl)); fclose($tmp); @@ -49,6 +52,7 @@ if ($sicktype1 > "1") { } $content = preg_replace( '/\$sickport = \"(.*?)\";/', '$sickport = "'.$sickport1.'";', $content); $content = preg_replace( '/\$sickname = \"(.*?)\";/', '$sickname = "'.$sickname1.'";', $content); +$content = preg_replace( '/\$SICKAPI = \"(.*?)\";/', '$SICKAPI = "'.$SICKAPI1.'";', $content); $content = preg_replace( '/\$sickpicname = \"(.*?)\";/', '$sickpicname = "'.$sickpicname1.'";', $content); // End of Sick Settigns @@ -66,6 +70,7 @@ if ($cpadultsvisible1 > "1") { $content = preg_replace( '/\$cpadultsvisible = \"(.*?)\";/', '$cpadultsvisible = "1";', $content); } $content = preg_replace( '/\$cpadultsname = \"(.*?)\";/', '$cpadultsname = "'.$cpadultsname1.'";', $content); +$content = preg_replace( '/\$CPAdultsAPI = \"(.*?)\";/', '$CPAdultsAPI = "'.$CPAdultsAPI1.'";', $content); $content = preg_replace( '/\$cpadultspicname = \"(.*?)\";/', '$cpadultspicname = "'.$cpadultspicname1.'";', $content); $content = preg_replace( '/\$cpadults = \"(.*?)\";/', '$cpadults = "'.$cpadults1.'";', $content); // CPKids Visible Update @@ -75,6 +80,7 @@ if ($cpkidsvisible1 > "1") { $content = preg_replace( '/\$cpkidsvisible = \"(.*?)\";/', '$cpkidsvisible = "1";', $content); } $content = preg_replace( '/\$cpkidsname = \"(.*?)\";/', '$cpkidsname = "'.$cpkidsname1.'";', $content); +$content = preg_replace( '/\$CPKidsAPI = \"(.*?)\";/', '$CPKidsAPI = "'.$CPKidsAPI1.'";', $content); $content = preg_replace( '/\$cpkidspicname = \"(.*?)\";/', '$cpkidspicname = "'.$cpkidspicname1.'";', $content); $content = preg_replace( '/\$cpkids = \"(.*?)\";/', '$cpkids = "'.$cpkids1.'";', $content); // End of Couch Settigns diff --git a/css/static.php b/css/static.php index 5f51c8a..5cac33f 100644 --- a/css/static.php +++ b/css/static.php @@ -9,5 +9,14 @@ tr { background-color:; } +#stats { + position: fixed; + bottom: 0; + font-size: 14pt; + width: 100%; + text-align: center; + color: black; + background-color: lightblue; + } diff --git a/feeds/SickBeard.php b/feeds/SickBeard.php new file mode 100644 index 0000000..1cba32e --- /dev/null +++ b/feeds/SickBeard.php @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + +
Coming Episodes
+ +
+

+ + + + + + diff --git a/main.php b/main.php index b3c42b9..193c8fb 100644 --- a/main.php +++ b/main.php @@ -8,6 +8,7 @@ + @@ -192,7 +193,15 @@ if ($showversion > "0") { echo "

Version - $localversion

"; } ?> +
+
+ "0") { + include "MediaStatus.php";; + } +?> +

@@ -221,7 +230,6 @@ if ($konvoschat > "0") { require "konvoschat.php"; } ?> - \ No newline at end of file diff --git a/right.php b/right.php index 033d301..9461aaf 100644 --- a/right.php +++ b/right.php @@ -4,7 +4,7 @@ - +