From e97539f2fbb2789cb2909189459a609a811ddb4d Mon Sep 17 00:00:00 2001 From: RiX Date: Thu, 23 Mar 2017 15:11:59 +0100 Subject: [PATCH 1/4] New German Strings --- lang/de.ini | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lang/de.ini b/lang/de.ini index 018b24458..d3635802d 100644 --- a/lang/de.ini +++ b/lang/de.ini @@ -169,34 +169,34 @@ 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" From 90a9741c3624b8e7fa8b3e4578965e568e010069 Mon Sep 17 00:00:00 2001 From: RiX Date: Thu, 23 Mar 2017 15:17:01 +0100 Subject: [PATCH 2/4] Fix --- lang/de.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/de.ini b/lang/de.ini index d3635802d..e0c723115 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" From 8e8254cae526251d0657ffc30638d86dfddaecea Mon Sep 17 00:00:00 2001 From: RiX Date: Thu, 23 Mar 2017 15:19:21 +0100 Subject: [PATCH 3/4] RSScrawler Icon My own project: https://github.com/rix1337/RSScrawler --- images/rsscrawler.png | Bin 0 -> 1762 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 images/rsscrawler.png diff --git a/images/rsscrawler.png b/images/rsscrawler.png new file mode 100644 index 0000000000000000000000000000000000000000..bbec59a90d8d40b9bb98010f972e99562c63b116 GIT binary patch literal 1762 zcmV<81|9i{P)004R=004l4008;_004mL004C`008P>0026e000+nl3&F}00002 zVoOIv0RM-N%)bBt010qNS#tmY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l7#bFXM$^hboImF>YBEOaUUufVWk26f)~A>|bE^AHluQckEFtzvj<- z4>PAY(BA_6w=n}=y(*UioR;_4CtN;M^R*f2=py4Z?$;FGH&JFR-LSxd1O)isOWm+L zR)IahmG)yH3(s&(wWbOF6rA?_)jyVBPu|Zo+h<@AhC5u*Ux2GtL9~20kVn=?0y$33 zY&q0J1>CRJNTOiZ0-3h}|E$a-eWL!11vu{N(%NuM?&py{Y=$r=s=`MB>j2>@Xu(^`K>Yso{QQZ4liYraU$@6K zw%i;q01{-ctmtl>AZf4w1Xm{Unw!3mbG&xeFG^%f#Zg?`HSn)uJ0pCWp}zi7TA#ZQ za)>=VMl5p@66I%b% Date: Thu, 23 Mar 2017 23:32:59 -0700 Subject: [PATCH 4/4] More Homepage Apps - SABnzbd - Headphones Added SABnzbd to homespage Added Headphones to homepage More Language Strings --- functions.php | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ homepage.php | 92 ++++++++++++++++++++++++------------------ lang/de.ini | 6 +++ lang/en.ini | 8 +++- lang/es.ini | 8 +++- lang/fr.ini | 8 +++- lang/it.ini | 8 +++- lang/nl.ini | 8 +++- lang/pl.ini | 8 +++- settings.php | 62 ++++++++++++++++++++++++++++ user.php | 8 +++- 11 files changed, 278 insertions(+), 47 deletions(-) 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/lang/de.ini b/lang/de.ini index e0c723115..0458b2c21 100644 --- a/lang/de.ini +++ b/lang/de.ini @@ -200,3 +200,9 @@ FILE = "Datei" STATUS = "Status" 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;