Browse Source

fix downloader and headphones issue

causefx 9 years ago
parent
commit
fcdb0ce972
3 changed files with 4 additions and 10 deletions
  1. 0 6
      downloader.php
  2. 3 3
      functions.php
  3. 1 1
      homepage.php

+ 0 - 6
downloader.php

@@ -12,7 +12,6 @@ isset($_GET['list']) ? $list = $_GET['list'] : die("Error");
 if($downloader == "nzbget"){
     
     $url = NZBGETURL;
-    $port = NZBGETPORT;
     $username = NZBGETUSERNAME;
     $password = NZBGETPASSWORD;
 
@@ -24,8 +23,6 @@ if($downloader == "nzbget"){
 
     }
 
-    if($port !== ""){ $url = $url . ":" . $port; }
-
     $address = $url;
 
     $api = file_get_contents("$url/$username:$password/jsonrpc/$list");
@@ -95,7 +92,6 @@ if($downloader == "nzbget"){
 if($downloader == "sabnzbd"){
     
     $url = SABNZBDURL;
-    $port = SABNZBDPORT;
     $key = SABNZBDKEY;
     
     $urlCheck = stripos($url, "http");
@@ -106,8 +102,6 @@ if($downloader == "sabnzbd"){
     
     }
     
-    if($port !== ""){ $url = $url . ":" . $port; }
-    
     $address = $url;
 
     $api = file_get_contents("$url/api?mode=$list&output=json&apikey=$key&limit=40");

+ 3 - 3
functions.php

@@ -1346,7 +1346,7 @@ function getRadarrCalendar($array){
 
 }
 
-function nzbgetConnect($url, $port, $username, $password, $list){
+function nzbgetConnect($url, $username, $password, $list){
     $url = qualifyURL(NZBGETURL);
     
     $api = file_get_contents("$url/$username:$password/jsonrpc/$list");
@@ -1405,7 +1405,7 @@ function nzbgetConnect($url, $port, $username, $password, $list){
 
 }
 
-function sabnzbdConnect($url, $port, $key, $list){
+function sabnzbdConnect($url, $key, $list){
     $url = qualifyURL(SABNZBDURL);
 
     $api = file_get_contents("$url/api?mode=$list&output=json&apikey=$key");
@@ -1454,7 +1454,7 @@ function sabnzbdConnect($url, $port, $key, $list){
 
 }
 
-function getHeadphonesCalendar($url, $port, $key, $list){
+function getHeadphonesCalendar($url, $key, $list){
 	$url = qualifyURL(HEADPHONESURL);
     
     $api = file_get_contents($url."/api?apikey=".$key."&cmd=$list");

+ 1 - 1
homepage.php

@@ -578,7 +578,7 @@ endif; ?>
 <?php if(SICKRAGEURL != ""){ echo getSickrageCalendarWanted($sickrage->future()); echo getSickrageCalendarHistory($sickrage->history("100","downloaded")); } ?>
 <?php if(SONARRURL != ""){ echo getSonarrCalendar($sonarr->getCalendar($startDate, $endDate)); } ?>
 <?php if(RADARRURL != ""){ echo getRadarrCalendar($radarr->getCalendar($startDate, $endDate)); } ?>                 
-<?php if(HEADPHONESURL != ""){ echo getHeadphonesCalendar(HEADPHONESURL, HEADPHONESPORT, HEADPHONESKEY, "getHistory"); echo getHeadphonesCalendar(HEADPHONESURL, HEADPHONESPORT, HEADPHONESKEY, "getWanted"); } ?>                                
+<?php if(HEADPHONESURL != ""){ echo getHeadphonesCalendar(HEADPHONESURL, HEADPHONESKEY, "getHistory"); echo getHeadphonesCalendar(HEADPHONESURL, HEADPHONESKEY, "getWanted"); } ?>                                
                     ],
                                             
                     eventRender: function eventRender( event, element, view ) {