mirror of
https://github.com/Dachande663/Plex-Export.git
synced 2025-12-20 09:50:10 -06:00
6
README
6
README
@@ -38,3 +38,9 @@ Features: (or: things I'll try and add as and when I get time)
|
||||
* Sort by name, year, rating etc
|
||||
* Pull in favourites from Plex
|
||||
* More detailed TV Show popup (seasons, episodes etc)
|
||||
|
||||
Notes2:
|
||||
* If your Plex Server is running in Home mode, we need to authenticate via a token
|
||||
* To get a valid token for your system, look here: https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token
|
||||
* Then when running cli.php, add a parameter like: -token=<Your Token>
|
||||
|
||||
|
||||
25
cli.php
25
cli.php
@@ -36,14 +36,25 @@ error_reporting(E_ALL ^ E_NOTICE | E_WARNING);
|
||||
$options['absolute-data-dir'] = dirname(__FILE__).'/'.$options['data-dir']; // Run in current dir (PHP CLI defect)
|
||||
$options['sort-skip-words'] = (array) explode(',', $options['sort-skip-words']); # comma separated list of words to skip for sorting titles
|
||||
|
||||
// Create the http header with a X-Plex-Token in it
|
||||
$headers = array(
|
||||
'http'=>array(
|
||||
'method'=>"GET",
|
||||
'header'=>"X-Plex-Token: ".$options['token']
|
||||
)
|
||||
);
|
||||
// Create the http header with a X-Plex-Token in it if specified
|
||||
|
||||
if (strlen($options['token']) == 0){
|
||||
$headers = array(
|
||||
'http'=>array(
|
||||
'method'=>"GET"
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$headers = array(
|
||||
'http'=>array(
|
||||
'method'=>"GET",
|
||||
'header'=>"X-Plex-Token: ".$options['token']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$context = stream_context_create($headers);
|
||||
|
||||
check_dependancies(); // Check everything is enabled as necessary
|
||||
|
||||
Reference in New Issue
Block a user