Guides: Plex Export
 

Plex Export scans your Plex server and saves all of the pictures into a folder that can be uploaded to a website. It's useful for showing users who don't have access to your plex server what is actually inside it. Click here to view mine.

Installating PlexExport on Windows 10 (Last updated 3/10/2021)

    • Download Plex Export from Github here: https://github.com/Dachande663/Plex-Export then extract the zip file to your C drive. (I did C:\PlexExport)
    • Download PHP if you don't already have it.

      You can get the latest stable release here: https://www.php.net/downloads.php (I picked the Windows 64 bit, non-threaded version)

      • Unzip the php zip file to a folder on your hard drive. (I did C:\php)
      • Now you need to make sure you have a file path pointing to your PHP folder so PowerShell can use the php command. Search for "environment" in the main Windows search bar and it will suggest Environment Variables. Look in the environment variables settings screen. Find the system variable section and locate the entry called Path. For the value of path, add ";C:\php" or wherever you installed your php folder from the zip file. Add ";C;\php\ext" if you enabled any extensions in your .ini file. Always put a semicolon (;) after each filepath you have listed under Path and don't use a / after the folder that your php files are in. (Use C:\php instead of C:\php\)
      • You have to reboot your computer after you install PHP for the first time, or at least sign off your Windows user account and sign back in.
      • To test PHP and make sure it's working, go into your C:\PlexExport folder (wherever you installed the plexexport .zip files to or really you can test with any folder other than your php folder). In the folder, hold your Shift key while you right click in the folder. Select the "Open PowerShell here" option and in PowerShell type "php -version". If PHP is installed and the path is pointing to it correctly you should see which version of PHP is installed.
  • Then, depending on whether you are wanting to run the Plex Export script on the computer than houses your Plex server or a different computer will determine what you need to enter in PowerShell.
  • If you're going to run the Plex Export script on the same computer that you run Plex off of, type this in PowerShell:

    First off, if you didn't hold shift + right click to open shell in your Plex Export folder, type: cd C:\PlexExport

    Next, type: php cli.php -token=INSERTPLEXTOKEN

    You can get your Plex token by using a web browser to view an item in your library. Select View XML and at the very end of the URL in your browswer will be your Plex token.

    If you're going to run the Plex Export script on a different computer than the one you run Plex off of, you need to specify the server. Type this in PowerShell:

    First off, if you didn't hold shift + right click to open shell in your Plex Export folder, type: cd C:\PlexExport

    Next, since you're using a different device from your Plex server, there is a setting you must change in Plex for the below command to work. In Plex, go to Settings -> Network -> Secure Connections and select Disabled.

    Now, type: php cli.php -plex-url=http://YOURLOCALPLEXIPADDRESSHERE:32400 -token=YOURPLEXTOKENHERE

    You can get your Plex token by using a web browser to view an item in your library. Select View XML and at the very end of the URL in your browswer will be your Plex token.

    The script will let you know when it's finished, mine took about 10 minutes. It generates thumbnail images of your library in the plex-data folder of your PlexExport folder.

    If it's your first time uploading your Plex Export files to your website, upload all of the files located in your PlexExport folder to your public_html EXCEPT the script itself (cli.php) and the readme file. If you want to rename your index.html to something you else you can (example: libraries.html).

    Since I've uploaded several instances of Plex Export over the years, I've heavily edited a lot of the css files and images so I save the assets folder and the css files when I'm deleting my existing Plex Export folder to update it. I unzip PlexExport and start fresh. After I generate the new thumbnails I copy my over my old css and assets>images files to my PlexExport folder. Then I delete the plex-data and assets folders via the file manager of my webhost so I can upload the new ones over FTP.

 

TIPS:

To make it easier, if you're using FTP for your website, in Windows you can assign it as a network place and can drag and drop the Plex Export generated files into a folder on your webserver. To add it in Windows, right click "My PC" in Windows Explorer and select "Map A Drive". Then do something like: ftp://ftp.yourwebsite.com and enter the correct username and password. If it works you should see your website pop up as a new folder in Windows.

To add your custom logo and background to the page find the assets folder, then images, and replace 'logo' and 'background' with your own images.

I find it's best to reinstall Plex Export new every time I want to use it. So unzip the rar to C:\PlexExport or something. Then run PowerShell in that folder.

You can exclude libraries by including only the libraries you want to include. To do this, first find out the section ID numbers for your libraries by entering this in command prompt:

"C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe" --list

If you installed Plex to any folder other than the default path listed above, you'll obviously need to modify the filepath to whatever you've done.

In my case, my sections are: 14 Audiobooks, 8 Documentaries (Movies), 9 Documentaries (TV), 7 Kids Shows, 5 Family Album, 6 Home Videos, 1 Movies, 13 Music FLAC, 3 Music mp3, 15 Music Videos, 11 Pre-Rolls, 2 TV Shows.

So I could do:

-sections=14,8,9,7,1,13,3,15,11,2

After you've done that, in PowerShell, rather than doing:

php cli.php -token=INSERTPLEXTOKEN
add on this with your specific library numbers: *Note I never got the sections to work so I'm stuck doing the one above
php cli.php -token=INSERTPLEXTOKEN -sections=14,8,9,7,1,13,3,15,11,2

Other Peoples Plex Exports

Once your movie library is pretty big it gets hardder to think of ones add to your collection. I find that viewing libraries of others can lead to finding several movies that I hadn't thought about. Here are ones I've encountered and drawn inspiration from:

 

Arc Browser | Blue Iris | DreamWeaver | EventGhost | FileBot | Home Assistant | KLWP | Node Red | Ombi | Plex | Plex Export | Spotify | Tasker | Tautulli | Trakt | Wansview | Wink

 

Copyright © 2021 brettstech.com. All Rights Reserved.