Export list of movies to text file

Hi,

 

I lost a harddisk but the movies are still listed in the plex database. I like to know what movies were on that harddisk. Is there a possiblity to export this list of movies, preferably per library (disk) location to textfile that I can read.

 

I searched the filesystem but could not figure out what file might have the data stored.

 

Are report generator or export list would be great.

 

My platform is Windows 8.1 Plex server 0.9.13

 

thanks Ludwig

Tons of various posts about this scattered through out the forum, and even the web.

Info to get you on your way. (All this is just from my memory and my just now 5-10 minutes of exploring/tinkering)

- Found some mention that one of the EXE files in the Plex directories can export a list. Found that using google, export plex list.

- The database files are sqlite.

- The database files seem to be stored in (where ever your appdata folder is\local or roaming\Plex Media Server\plug in support\databases (unsure which if not the largest file would contain all paths)

- Firefox has a nice extension called SQLite Manager you can get from mozilla.org to browse any sqlite db. (I spent 10 minutes trying to find the right table...it's late, I'm tired, might be easy, I missed it)

Additionally, I tinkered with my actual web management server.

On your server PC, go to http://127.0.0.1:32400/library/sections

XML text will come up.

Find the Key number for your movies section. Mine was 4.

Add the key number to the URL - http://127.0.0.1:32400/library/sections/

Now that you see that info, add /all = http://127.0.0.1:32400/library/sections/4/all

Using this URL, I was able to see all my movies in a huge too much info but it has what you need at "file="

Save that to .xml

Use any app that will edit/read XML files, filter by file=, clean out the rest not needed.

OR!!!

Do this, found using Google!

http://www.reddit.com/r/PleX/comments/1pmro6/library_export/

Seems much more straight forward than my previous, and probably sorts info for you.

1 Like

Thanks great stuff!

Is there a way to get a list of history that is no longer showing.

My Hard Drive lost its partition and I am working on trying to use some Partition Recovery tools.

But now the movies are no longer showing in my library, which makes sense because the library no longer there.
Is there a why to see all movies that have been added in the past even if they are no longer there.

@twach116 , I’d recommend Plex2CSV


Export has multiple level options.
You’ll have to read the channels support wiki (linked from release post) or search the thread for which ‘level’ of export will show what’s missing.
I know Dane22 added the missing feature after I and another user requested it a few months ago when I was trying to help that user with same issue. (He shares with me. He lost some stuff I wanted to watch cry)

Hello Ludwig,

I know this is an old post, but I still think this activity is relevant even now.

I’m in the same boat as you. I had a RAID 5 array, that for some reason, I didn’t get any alerts when 1 of the drives failed. And then later on a second drive failed. So I don’t know what movies were on that storage array without out checking each movie manually.

But I did find a handy way of doing it using Powershell in Windows;

Open a Powershell window as an administrator, navigate to the directory where Plex Media Server is installed at;

*C:*
CD 'C:\Program Files (x86)\Plex\Plex Media Server’

and run the following command;

’.\Plex Media Scanner.exe’ -t -c 1 | where-object {$_ -like ‘D:\Movies’} > movies_on_d.txt

This approach normally would list out the title of the movie, followed by Poster metadata info followed by movie parts, subtitles and codec information on each line for each movie file and where the movie file is located. This can be dumped to a text file, but we can filter this data out in powershell and only return useful information;

Since I have some movies, that have additional versions of the movie stored in multiple hard drive locations, we would get a movie title, followed by more than 1 file location for movies associated with this title.

Using the powershell ‘where’ command, we can only show lines where the full movie path has part of the search path your are looking for. In my case ‘D:\Movies’.

Plex Media Scanner.exe’ -t -c 1

The -t says to list sub tree information. the -c 1 says to list section 1. For me, section 1 is Movies. Section 2 is Music, 3 is Photos and 6 is TV Shows.

To find out what your sections are, run this command in powershell first (Using the -l switch);

PS C:\Program Files (x86)\Plex\Plex Media Server> & ‘.\Plex Media Scanner.exe’ -l

  • 1: Movies*
  • 2: Music*
  • 3: Photos*
  • 6: TV Shows*

It will list out the sections you have.
Here’s a sample of my movies_on_d.txt file looks like after running the full powershell command;

’.\Plex Media Scanner.exe’ -t -c 1 | where-object {$_ -like ‘D:\Movies’} > movies_on_d.txt

  * Part: D:\Movies\2 Fast 2 Furious (2003)\2.Fast.2.Furious.2003.BluRay.1080p.x264.DTS.mkv
  * Part: D:\Movies\Die Hard 2 - Die Harder (1990)\Die Hard 2 Die Harder 1990 Eng Subs 1080p [H264-mp4].mp4
  * Part: D:\Movies\3 Ninjas (1992)\3 Ninjas 1992.m4v
  * Part: D:\Movies\3 Ninjas Kick Back (1994)\3 Ninjas Kick Back 1994.m4v
  * Part: D:\Movies\3 Ninjas Knuckle Up (1995)\3 ninjas knuckle up 1995.m4v
  * Part: D:\Movies\3 Ninjas High Noon at Mega Mountain (1998)\3 Ninjas High Noon at Mega Mountain 1998.m4v
  * Part: D:\Movies\310 to Yuma (2007)\310 to Yuma 2007 1080p BluRay AC3 x264-BrRip.mkv
  * Part: D:\Movies\8 Mile (2002)\8 Mile (2002) 1080p BrRip 5.1 x264 aac.mp4
  * Part: D:\Movies\9 (2009)\9.2009.1080p.BluRay.x264.mp4
  * Part: D:\Movies\10 Cloverfield Lane (2016)\10.Cloverfield.Lane.2016.Bluray.1080p.TrueHD-7.1.Atmos.x264.mkv

================================
This gives me the actual file names and their full path location for any movies on D: drive.

I used the same thing to find out what TV shows I have on D: drive that I lost.

’.\Plex Media Scanner.exe’ -t -c 6 | where-object {$_ -like ‘D:\TV’} > tv_on_d.txt

-c 6 is my section for TV Shows.

Clever powershell users can even exclude the ‘* Part: D:\Movies’ prefix, and remove everything after the ‘’ to get a list like;

2 Fast 2 Furious (2003)
Die Hard 2 - Die Harder (1990)
etc…

I hope this helps you guys. This solved my problem.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.