Skip to content

Commit

Permalink
fix downloader and headphones issue
Browse files Browse the repository at this point in the history
  • Loading branch information
causefx committed Apr 10, 2017
1 parent fbfd810 commit fcdb0ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
if($downloader == "nzbget"){

$url = NZBGETURL;
$port = NZBGETPORT;
$username = NZBGETUSERNAME;
$password = NZBGETPASSWORD;

Expand All @@ -24,8 +23,6 @@

}

if($port !== ""){ $url = $url . ":" . $port; }

$address = $url;

$api = file_get_contents("$url/$username:$password/jsonrpc/$list");
Expand Down Expand Up @@ -95,7 +92,6 @@
if($downloader == "sabnzbd"){

$url = SABNZBDURL;
$port = SABNZBDPORT;
$key = SABNZBDKEY;

$urlCheck = stripos($url, "http");
Expand All @@ -106,8 +102,6 @@

}

if($port !== ""){ $url = $url . ":" . $port; }

$address = $url;

$api = file_get_contents("$url/api?mode=$list&output=json&apikey=$key&limit=40");
Expand Down
6 changes: 3 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion homepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ function localStorageSupport() {
<?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 ) {
Expand Down

0 comments on commit fcdb0ce

Please sign in to comment.