Skip to content

Commit

Permalink
Merge pull request #359 from causefx/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
causefx authored May 27, 2017
2 parents 2efcb29 + 29be2ff commit e52da19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,10 @@ function getPlexStreams($size){
$address = qualifyURL(PLEXURL);

// Perform API requests
$api = file_get_contents($address."/status/sessions?X-Plex-Token=".PLEXTOKEN);
$api = @file_get_contents($address."/status/sessions?X-Plex-Token=".PLEXTOKEN);
$api = simplexml_load_string($api);
$getServer = simplexml_load_string(@file_get_contents($address."/?X-Plex-Token=".PLEXTOKEN));
if (!is_array($getServer)) { return 'Could not load!'; }
if (!$getServer) { return 'Could not load!'; }

// Identify the local machine
$gotServer = $getServer['machineIdentifier'];
Expand Down Expand Up @@ -686,10 +686,10 @@ function getPlexRecent($type, $size){
}

// Perform Requests
$api = file_get_contents($address."/library/recentlyAdded?X-Plex-Token=".PLEXTOKEN);
$api = @file_get_contents($address."/library/recentlyAdded?X-Plex-Token=".PLEXTOKEN);
$api = simplexml_load_string($api);
$getServer = simplexml_load_string(@file_get_contents($address."/?X-Plex-Token=".PLEXTOKEN));
if (!is_array($getServer)) { return 'Could not load!'; }
if (!$getServer) { return 'Could not load!'; }

// Identify the local machine
$gotServer = $getServer['machineIdentifier'];
Expand Down

0 comments on commit e52da19

Please sign in to comment.