diff --git a/functions.php b/functions.php index 1c456e86d..ab040a2db 100644 --- a/functions.php +++ b/functions.php @@ -507,6 +507,7 @@ function nzbgetConnect($url, $port, $username, $password, $list){
+

'.round($downloadPercent).'%

'.$downloadPercent.'% Complete
@@ -521,8 +522,116 @@ function nzbgetConnect($url, $port, $username, $password, $list){ } if($i > 0){ return $gotNZB; } + if($i == 0){ echo '

No Results

'; } } +function sabnzbdConnect($url, $port, $key, $list){ + + $urlCheck = stripos($url, "http"); + + if ($urlCheck === false) { + + $url = "http://" . $url; + + } + + if($port !== ""){ $url = $url . ":" . $port; } + + $address = $url; + + $api = file_get_contents("$url/api?mode=$list&output=json&apikey=$key"); + + $api = json_decode($api, true); + + $i = 0; + + $gotNZB = ""; + + foreach ($api[$list]['slots'] AS $child) { + + $i++; + if($list == "queue"){ $downloadName = $child['filename']; $downloadCategory = $child['cat']; $downloadPercent = (($child['mb'] - $child['mbleft']) / $child['mb']) * 100; $progressBar = "progress-bar-striped active"; } + if($list == "history"){ $downloadName = $child['name']; $downloadCategory = $child['category']; $downloadPercent = "100"; $progressBar = ""; } + $downloadStatus = $child['status']; + //echo '
' . var_export($child, true) . '
'; + + + $gotNZB .= ' + + '.$downloadName.' + '.$downloadStatus.' + '.$downloadCategory.' + + + +
+ +
+ +

'.round($downloadPercent).'%

+ '.$downloadPercent.'% Complete + +
+ +
+ + + + '; + + + } + + if($i > 0){ return $gotNZB; } + if($i == 0){ echo '

No Results

'; } + +} + +function getHeadphonesCalendar($url, $port, $key, $list){ + + $urlCheck = stripos($url, "http"); + + if ($urlCheck === false) { + + $url = "http://" . $url; + + } + + if($port !== ""){ $url = $url . ":" . $port; } + + $address = $url; + + $api = file_get_contents($address."/api?apikey=".$key."&cmd=$list"); + + $api = json_decode($api, true); + + $i = 0; + + $gotCalendar = ""; + + foreach($api AS $child) { + + //echo '
' . var_export($child, true) . '
'; + + if($child['Status'] != "Skipped"){ + + $i++; + $albumName = $child['AlbumTitle']; + $albumArtist = $child['ArtistName']; + $albumDate = $child['ReleaseDate']; + $albumStatus = $child['Status']; + + if($albumStatus == "Wanted"){ $albumStatus = "red-bg";}elseif($albumStatus == "Downloaded"){ $albumStatus = "green-bg";} + + $gotCalendar .= "{ title: \"$albumArtist - $albumName\", start: \"$albumDate\", className: \"$albumStatus\", imagetype: \"music\" }, \n"; + + } + + } + + if ($i != 0){ return $gotCalendar; } + +} ?> \ No newline at end of file diff --git a/homepage.php b/homepage.php index 82e40cce0..08fe220eb 100644 --- a/homepage.php +++ b/homepage.php @@ -184,8 +184,8 @@

- -
+ +
@@ -193,7 +193,7 @@
-

NZBGet

+

-
+
-
+
@@ -314,7 +316,7 @@
-
+
@@ -374,41 +376,51 @@ diff --git a/images/rsscrawler.png b/images/rsscrawler.png new file mode 100644 index 000000000..bbec59a90 Binary files /dev/null and b/images/rsscrawler.png differ diff --git a/lang/de.ini b/lang/de.ini index 018b24458..0458b2c21 100644 --- a/lang/de.ini +++ b/lang/de.ini @@ -148,7 +148,7 @@ TRANSLATIONS = "Übersetzungen" TRANSLATIONS_ABOUT = "Wir benötigen immer Hilfe bei der Übersetzung. Sollten Sie eine andere Sprache als Englisch sprechen, so helfen Sie uns bitte, wenn Sie können. Wenn Sie bereit sind zu helfen, gehen Sie auf Github und bieten dort Ihre Hilfe an." UPGRADE = "Upgrade" LOADING_COLOR = "Hintergrund Ladebildschirm" -HOVER_TEXT = "Hover Text" +HOVER_TEXT = "Einblendungs-Text" COOKIE_PASSWORD = "Cookie-Passwort" CREATE_USER = "Konto registrieren" ENTER_PASSWORD_TO_REGISTER = "Registrierungspasswort eingeben" @@ -169,34 +169,40 @@ SHOW_LESS = "Weniger zeigen" EDIT_CUSTOM_CSS = "Eigenes CSS" CUSTOM_COMPLETE = "EIGENES CSS GESPEICHERT!" SAVE_CSS = "CSS speichern" -MENU = "Menu" +MENU = "Menü" GRAVATAR = "Gravatar" PLEX_URL = "Plex URL" PLEX_PORT = "Plex Port" PLEX_TOKEN = "Plex Token" -RECENT_MOVIES = "Recent Movies" -RECENT_TV = "Recent TV" -RECENT_MUSIC = "Recent Music" -PLAYING_NOW = "Playing Now" -PLAYING_NOW_ON_PLEX = "Playing Now on PLEX" -RECENTLY_ADDED_TO_PLEX = "Recently Added to PLEX" -MOVIES = "Movies" -TV_SHOWS = "TV Shows" -MUSIC = "Music" +RECENT_MOVIES = "Aktuelle Filme" +RECENT_TV = "Aktuelle Serien" +RECENT_MUSIC = "Aktuelle Musik" +PLAYING_NOW = "Aktuell läuft" +PLAYING_NOW_ON_PLEX = "Aktuell läuft auf PLEX" +RECENTLY_ADDED_TO_PLEX = "Zuletzt zu PLEX hinzugefügt" +MOVIES = "Filme" +TV_SHOWS = "Serien" +MUSIC = "Musik" SONARR_URL = "Sonarr URL" SONARR_PORT = "Sonarr Port" -SONARR_KEY = "Sonarr API Key" +SONARR_KEY = "Sonarr API Schlüssel" RADARR_URL = "Radarr URL" RADARR_PORT = "Radarr Port" -RADARR_KEY = "Radarr API Key" -MONTH = "Month" -DAY = "Day" -WEEK = "Week" +RADARR_KEY = "Radarr API Schlüssel" +MONTH = "Monat" +DAY = "Tag" +WEEK = "Woche" NZBGET_URL = "NZBGet URL" NZBGET_PORT = "NZBGet Port" -QUEUE = "Queue" -HISTORY = "History" -FILE = "File" +QUEUE = "Warteschlange" +HISTORY = "Historie" +FILE = "Datei" STATUS = "Status" -CATEGORY = "Category" -PROGRESS = "Progress" \ No newline at end of file +CATEGORY = "Kategorie" +PROGRESS = "Fortschritt" +SABNZBD_URL = "SABnzbd URL" +SABNZBD_PORT = "SABnzbd Port" +SABNZBD_KEY = "SABnzbd API Key" +HEADPHONES_URL = "Headphones URL" +HEADPHONES_PORT = "Headphones Port" +HEADPHONES_KEY = "Headphones API Key" \ No newline at end of file diff --git a/lang/en.ini b/lang/en.ini index 2b330f6e2..52031ebfc 100644 --- a/lang/en.ini +++ b/lang/en.ini @@ -199,4 +199,10 @@ HISTORY = "History" FILE = "File" STATUS = "Status" CATEGORY = "Category" -PROGRESS = "Progress" \ No newline at end of file +PROGRESS = "Progress" +SABNZBD_URL = "SABnzbd URL" +SABNZBD_PORT = "SABnzbd Port" +SABNZBD_KEY = "SABnzbd API Key" +HEADPHONES_URL = "Headphones URL" +HEADPHONES_PORT = "Headphones Port" +HEADPHONES_KEY = "Headphones API Key" \ No newline at end of file diff --git a/lang/es.ini b/lang/es.ini index 01cc7bb16..b8006be76 100644 --- a/lang/es.ini +++ b/lang/es.ini @@ -199,4 +199,10 @@ HISTORY = "History" FILE = "File" STATUS = "Status" CATEGORY = "Category" -PROGRESS = "Progress" \ No newline at end of file +PROGRESS = "Progress" +SABNZBD_URL = "SABnzbd URL" +SABNZBD_PORT = "SABnzbd Port" +SABNZBD_KEY = "SABnzbd API Key" +HEADPHONES_URL = "Headphones URL" +HEADPHONES_PORT = "Headphones Port" +HEADPHONES_KEY = "Headphones API Key" \ No newline at end of file diff --git a/lang/fr.ini b/lang/fr.ini index 76745d3dd..a3b98fcff 100644 --- a/lang/fr.ini +++ b/lang/fr.ini @@ -199,4 +199,10 @@ HISTORY = "History" FILE = "File" STATUS = "Status" CATEGORY = "Category" -PROGRESS = "Progress" \ No newline at end of file +PROGRESS = "Progress" +SABNZBD_URL = "SABnzbd URL" +SABNZBD_PORT = "SABnzbd Port" +SABNZBD_KEY = "SABnzbd API Key" +HEADPHONES_URL = "Headphones URL" +HEADPHONES_PORT = "Headphones Port" +HEADPHONES_KEY = "Headphones API Key" \ No newline at end of file diff --git a/lang/it.ini b/lang/it.ini index 12880b2b2..93f6ca6e6 100644 --- a/lang/it.ini +++ b/lang/it.ini @@ -199,4 +199,10 @@ HISTORY = "History" FILE = "File" STATUS = "Status" CATEGORY = "Category" -PROGRESS = "Progress" \ No newline at end of file +PROGRESS = "Progress" +SABNZBD_URL = "SABnzbd URL" +SABNZBD_PORT = "SABnzbd Port" +SABNZBD_KEY = "SABnzbd API Key" +HEADPHONES_URL = "Headphones URL" +HEADPHONES_PORT = "Headphones Port" +HEADPHONES_KEY = "Headphones API Key" \ No newline at end of file diff --git a/lang/nl.ini b/lang/nl.ini index 7a5635613..2c3a4ce5f 100644 --- a/lang/nl.ini +++ b/lang/nl.ini @@ -199,4 +199,10 @@ HISTORY = "History" FILE = "File" STATUS = "Status" CATEGORY = "Category" -PROGRESS = "Progress" \ No newline at end of file +PROGRESS = "Progress" +SABNZBD_URL = "SABnzbd URL" +SABNZBD_PORT = "SABnzbd Port" +SABNZBD_KEY = "SABnzbd API Key" +HEADPHONES_URL = "Headphones URL" +HEADPHONES_PORT = "Headphones Port" +HEADPHONES_KEY = "Headphones API Key" \ No newline at end of file diff --git a/lang/pl.ini b/lang/pl.ini index 1132e31c5..537d51a15 100644 --- a/lang/pl.ini +++ b/lang/pl.ini @@ -199,4 +199,10 @@ HISTORY = "History" FILE = "File" STATUS = "Status" CATEGORY = "Category" -PROGRESS = "Progress" \ No newline at end of file +PROGRESS = "Progress" +SABNZBD_URL = "SABnzbd URL" +SABNZBD_PORT = "SABnzbd Port" +SABNZBD_KEY = "SABnzbd API Key" +HEADPHONES_URL = "Headphones URL" +HEADPHONES_PORT = "Headphones Port" +HEADPHONES_KEY = "Headphones API Key" \ No newline at end of file diff --git a/settings.php b/settings.php index c3d910fef..a91ce23df 100644 --- a/settings.php +++ b/settings.php @@ -1335,6 +1335,18 @@ function rcopy($src, $dst) { + +
  • + + + +
  • + +
  • + + + +
  • @@ -1488,6 +1500,56 @@ function rcopy($src, $dst) {
    + +
    + +
    + + " autocorrect="off" autocapitalize="off" value=""> +

    translate("SABNZBD_URL");?>

    + +
    + +
    + + " autocorrect="off" autocapitalize="off" value=""> +

    translate("SABNZBD_PORT");?>

    + +
    + +
    + + " autocorrect="off" autocapitalize="off" value=""> +

    translate("SABNZBD_KEY");?>

    + +
    + +
    + +
    + +
    + + " autocorrect="off" autocapitalize="off" value=""> +

    translate("HEADPHONES_URL");?>

    + +
    + +
    + + " autocorrect="off" autocapitalize="off" value=""> +

    translate("HEADPHONES_PORT");?>

    + +
    + +
    + + " autocorrect="off" autocapitalize="off" value=""> +

    translate("HEADPHONES_KEY");?>

    + +
    + +
    diff --git a/user.php b/user.php index 3b8baa03e..00fc2d4b3 100644 --- a/user.php +++ b/user.php @@ -8,7 +8,7 @@ * salting subsequent password checks. */ - define('INSTALLEDVERSION', '1.18'); + define('INSTALLEDVERSION', '1.20'); $databaseConfig = parse_ini_file('databaseLocation.ini.php', true); define('USER_HOME', $databaseConfig['databaseLocation'] . '/users/'); @@ -45,6 +45,12 @@ if(!empty($homepageConfig['nzbgetPort'])) : define('NZBGETPORT', $homepageConfig['nzbgetPort']); else : define('NZBGETPORT', ''); endif; if(!empty($homepageConfig['nzbgetUsername'])) : define('NZBGETUSERNAME', $homepageConfig['nzbgetUsername']); else : define('NZBGETUSERNAME', ''); endif; if(!empty($homepageConfig['nzbgetPassword'])) : define('NZBGETPASSWORD', $homepageConfig['nzbgetPassword']); else : define('NZBGETPASSWORD', ''); endif; + if(!empty($homepageConfig['sabnzbdKey'])) : define('SABNZBDKEY', $homepageConfig['sabnzbdKey']); else : define('SABNZBDKEY', ''); endif; + if(!empty($homepageConfig['sabnzbdURL'])) : define('SABNZBDURL', $homepageConfig['sabnzbdURL']); else : define('SABNZBDURL', ''); endif; + if(!empty($homepageConfig['sabnzbdPort'])) : define('SABNZBDPORT', $homepageConfig['sabnzbdPort']); else : define('SABNZBDPORT', ''); endif; + if(!empty($homepageConfig['headphonesKey'])) : define('HEADPHONESKEY', $homepageConfig['headphonesKey']); else : define('HEADPHONESKEY', ''); endif; + if(!empty($homepageConfig['headphonesURL'])) : define('HEADPHONESURL', $homepageConfig['headphonesURL']); else : define('HEADPHONESURL', ''); endif; + if(!empty($homepageConfig['headphonesPort'])) : define('HEADPHONESPORT', $homepageConfig['headphonesPort']); else : define('HEADPHONESPORT', ''); endif; if(file_exists('custom.css')) : define('CUSTOMCSS', 'true'); else : define('CUSTOMCSS', 'false'); endif;