Plex Web Export

If you created a Plex Home then all the addresses need to be updated with the plex token and PlexExport hasn't been updated to that sadly.

If you are out of any plex home though it should work normally.

I just created a pull request for the "regular" version against the authors git.

Usage:

As usual, but added a parameter

-token=

Like :

php c:\Plex-Export\cli.php -plex-url=“http://qnap2:32400” -token=SzzzzZZZZxxxxKXXXXpU

To find a valid token for your system, look here:

https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token

Merry Plex, and a happy new Plex

/Tommy

EDIT: It has now been merged into the official one by Luke, the origen author. Find it in the first post in this thread

Can you put a direct link to this merged version of Luke? I can't seem to find it.

I would like to use this token feature as I don't want to leave the Plex Home.

Or if possible you can post the source code of the file we need to edit with this token option.

Thanks!

The latest changes from the pull request have been merged into master, so if you pull down you'll have them. Cheers @dane22!

The latest changes from the pull request have been merged into master, so if you pull down you'll have them. Cheers @dane22!

Thanks.

This only counts for the Master and not V2? Is this only a change in the cli.php? as I am getting "Error: No sections were found in this Plex library

11:30:29 Error: Could not load section data, aborting" with the master branche

 

My command line: php cli.php -sections=1,2,3,4,5,6 -plex-url=http://mylocalip:32400 -token=mytoken  ---> got this from XML 'trick'

V2 branche:

Error: Could not connect to Plex API:

Thanks.

This only counts for the Master and not V2? Is this only a change in the cli.php? as I am getting "Error: No sections were found in this Plex library

11:30:29 Error: Could not load section data, aborting" with the master branche

 

My command line: php cli.php -sections=1,2,3,4,5,6 -plex-url=http://mylocalip:32400 -token=mytoken  ---> got this from XML 'trick'

V2 branche:

Error: Could not connect to Plex API:

It's only the master branch that has been updated, and the change is only in the cli.php file

/T

It's only the master branch that has been updated, and the change is only in the cli.php file

/T

Just a heads up that this change causes the master branch code to fail if a token is not used.

It results in a message of 'The Plex library could not be found at http://localhost:32400' and the script stops.

Scratched my head over this on a new install for several hours. I do not use Plex Home and thus have no token. Had to revert the code in cli.php to the version before the token change to get it to work.

Maybe I'm wrong but the code might need to be fixed for users without a token...

-= SomeHuman =-

Just a heads up that this change causes the master branch code to fail if a token is not used.

It results in a message of 'The Plex library could not be found at http://localhost:32400' and the script stops.

Scratched my head over this on a new install for several hours. I do not use Plex Home and thus have no token. Had to revert the code in cli.php to the version before the token change to get it to work.

Maybe I'm wrong but the code might need to be fixed for users without a token...

-= SomeHuman =-

Sadly confirmed  :(

I've fixed the issue, and a PR has been created against the master

Until then, find the fix in my github fork here: https://github.com/ukdtom/Plex-Export

So sorry about that

Happy New Year

/T

Excellent, this worked as a charm!

I'm having trouble getting this going. Any help would be appreciated.

It would be nice if an option to download each video file was added, from what I've seen in the features this isn't supported. I want to run this and share through apache so having access to the files would be nice. All that would need to be done is specify the root of your apache share, and then have it generate the link based on the full path from plex and the apache path.

Anyways, heres my issue. Plex is running on the local server and ExportPlex is aswell, I'm able to access and stream from plex remotely using the chrome web app and so are friends yet I'm still receiving this error.

When I go to http://localhost:32400/ in the browser in the machine you can see it's running and returns the xml data.


[root@rhel7 PlexExport]# git pull
Already up-to-date.
[root@rhel7 PlexExport]# cli.php    
bash: cli.php: command not found...
[root@rhel7 PlexExport]# ls -lth
total 52K
drwxr-xr-x 2 root root   23 Jan  3 16:06 plex-data
-rw-r--r-- 1 root root 2.8K Jan  3 16:06 index.html
-rw-r--r-- 1 root root  41K Jan  3 16:06 cli.php
drwxr-xr-x 5 root root   38 Jan  3 16:06 assets
-rw-r--r-- 1 root root 1.6K Jan  3 16:06 README
[root@rhel7 PlexExport]# php ./cli.php 
21:15:16 Welcome to the Plex Exporter v1
21:15:16 Searching for sections in the Plex library at http://localhost:32400/
21:15:16 Error: The Plex library could not be found at http://localhost:32400/
21:15:16 Error: Could not load section data, aborting
[root@rhel7 PlexExport]# service plexmediaserver status
plexmediaserver.service - Plex Media Server for Linux
   Loaded: loaded (/usr/lib/systemd/system/plexmediaserver.service; enabled)
   Active: active (running) since Fri 2015-01-02 18:23:07 EST; 21h ago
 Main PID: 13415 (Plex Media Serv)
   CGroup: /system.slice/plexmediaserver.service
           â”─13415 /usr/lib/plexmediaserver/Plex Media Server
           â”─13545 /usr/lib/plexmediaserver/Plex DLNA Server
           â””─15211 Plex Plug-in [com.plexapp.system] /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bun...
 
Jan 03 01:42:57 rhel7 sh[13415]: !!! Plex Transcoder v3.003.14.1216-0344 (e2da988, RELEASE, ) !!!
Jan 03 01:42:57 rhel7 sh[13415]: ----------------------------------------------------------------------------
Jan 03 01:43:11 rhel7 sh[13415]: !!! Plex Transcoder v3.003.14.1216-0344 (e2da988, RELEASE, ) !!!
Jan 03 01:43:11 rhel7 sh[13415]: ----------------------------------------------------------------------------
Jan 03 01:43:38 rhel7 sh[13415]: !!! Plex Transcoder v3.003.14.1216-0344 (e2da988, RELEASE, ) !!!
Jan 03 01:43:38 rhel7 sh[13415]: ----------------------------------------------------------------------------
Jan 03 01:45:10 rhel7 sh[13415]: !!! Plex Transcoder v3.003.14.1216-0344 (e2da988, RELEASE, ) !!!
Jan 03 01:45:10 rhel7 sh[13415]: ----------------------------------------------------------------------------
Jan 03 01:45:11 rhel7 sh[13415]: !!! Plex Transcoder v3.003.14.1216-0344 (e2da988, RELEASE, ) !!!
Jan 03 01:45:11 rhel7 sh[13415]: ----------------------------------------------------------------------------
[root@rhel7 PlexExport]# git branch
* master

I'm having trouble getting this going. Any help would be appreciated.

It would be nice if an option to download each video file was added, from what I've seen in the features this isn't supported. I want to run this and share through apache so having access to the files would be nice. All that would need to be done is specify the root of your apache share, and then have it generate the link based on the full path from plex and the apache path.

Not a place for RFE's

Create an issue with this on GitHub.

This is a thread belonging to the devs forums

And when said, not my app, but would think that's out of scope for Plex-Export

[root@rhel7 PlexExport]# git branch
* master

What git ?

Currently, if not using tokens, you should go with this one:

https://forums.plex.tv/topic/19053-plex-web-export/?p=808606

/T

Not a place for RFE's

Create an issue with this on GitHub.

This is a thread belonging to the devs forums

And when said, not my app, but would think that's out of scope for Plex-Export

What git ?

Currently, if not using tokens, you should go with this one:

https://forums.plex.tv/topic/19053-plex-web-export/?p=808606

/T

Sorry about that, my mistake.

I've switched to the git you've provided and it appears to be working now.

I was using https://github.com/Dachande663/Plex-Export/tree/master previously (what's the difference)

I was using https://github.com/Dachande663/Plex-Export/tree/master previously (what's the difference)

And so you should in the future (Read: As soon as he accept my PR)

And he's not to blame in anyway, I am.....He accepted a PR from me, that added token support, but sadly broke stuff if not using tokens, and so sorry for that

/T

Merged. Massive thanks to @dane22 for being on top of this :)

Thanks for your help, it's working fine now. Where can I add feature requests?

Well, it's the OP's choice, but since it more or less looks like Dachande663 returned to us after been absent for a while  :wub: I'll humbly suggest maybe a new release thread in the Channels forum with a subject like: [REL]: Plex-Export?

After all, regular users, that would benefit from this beautiful app, never digs into a dev forum, and this forum is actually intended for dev Q's, and not for regular support or RFE's, which most posts in this thread seems to have been.

And if so, then the mighty OP has to create it, or if requested, I can move it, and change the thread topic

OP's call here

/T

I've always just been incredibly lazy and used the email alerts on this thread to know when new questions have been posed (it is four years old now). Seeing as how you know your way around the Plex forums, it seems making a new thread in Channels would be best. I'll do that now and update the first post in this thread to point support requests to it.

Is there a full tutorial on getting this running? I've been trying for the past couple hours, but not making any progress. 

Is there a full tutorial on getting this running? I've been trying for the past couple hours, but not making any progress. 

You need to be a little more specific about your issues:

- What system are you trying to make it work on? (Windows, Mac, a NAS)

For Windows and Mac you will need to install a PHP program (wamp for instance or something similar) then once it is up and running launch the cli.php file after making sure it targets your Plex server if it is not on the same machine where you launch PlexExport (ie specify the IP of the Plex Server)

For a NAS, it should be fairly easy if you have your Plex Server on it. Most NAS have their own web space so you just need to drop Plex Export there and launch the cli.php from your browser (http:// NAS.IP/PlexExport/cli.php)

I want to export file link. So I modify plexmedia.php like that:

    public function setFilelink($val) { if(!$val) $this->filelink = (float) $val; return $this; }
    public function getFilelink() { return $this->filelink; }

////////////////////////////////////////////////////////////////////////////////////////////////

if(isset($xml->Part)) {
foreach($xml->Part as $part) {
$running_parts++;
$filesize = floatval($part->attributes()->size); # floatval, not int (max size diff)
if($filesize>0) $running_filesize += $filesize;
$filelink = $part->attributes()->file;
if(!$filelink) $running_filelink += $filelink;

////////////////////////////////////////////////////////////////////////////////////////////////

if(!$running_filelink) $media->setFilelink($running_filelink);

And in item_movie.php:

<?php if($media->getFilelink()): ?>
  • Download
  • <?php endif; ?>

    But it doesn't work.

    As you can see, I'm not very good in php :)

    Can you help me please ?

    May I ask, why you want to publish the file link on a web server?

    If you simply needs a list, then check my Plex2CSV in my signature

    /T