Skip to content

Commit

Permalink
Plex token changes
Browse files Browse the repository at this point in the history
Get rid of token expiration
  • Loading branch information
d4rk22 committed May 15, 2016
1 parent 1702a9b commit 0de2879
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions assets/php/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@

// Set the path for the Plex Token
$plexTokenCache = ROOT_DIR . '/cache/plex_token.txt';
// Check to see if the plex token exists and is younger than one week
// if not grab it and write it to the cache folder
if (file_exists($plexTokenCache) && (filemtime($plexTokenCache) > (time() - 60 * 60 * 24 * 7))) {
// Check to see if the plex token exists if not grab it and write it to the cache folder
if (file_exists($plexTokenCache) {
$plexToken = file_get_contents(ROOT_DIR . '/cache/plex_token.txt');
file_put_contents($debug_file, date('Y-n-j G:i:s').' Using cached Plex token'."\r\n", FILE_APPEND);
} else {
Expand Down

0 comments on commit 0de2879

Please sign in to comment.