MovieFan's Database Tool for Plex

That's the exact message I was getting. At least we're consistent.

Solved that problem... I was running the wrong .mscr file (an old one, not the one a few posts above).

I'm still having issues with it not writing certain .jpg files that it claims it had created.

Here is my log file...  The first two (and consistent) failures are "Apollo 13" and "Back to the Future"

It writes the -fanart file, but not the poster file.

If you look a little further it's also saying (although not consistently), "Script not able to handle http files."

Surely Plex is not going out to the internet to get these files every time I open the library?

I thought once that file was retrieved from the web, it was imported into the Plex database, and then this tool was just writing it back out?

library_poster.log (428 KB)

yes, I think the big man is working on those.  It seems, from his earlier posts that the way they were being created did not fit some parameters or something.  I'm sure we'll get an update in the near future.  Then we'll just need this to work on TV shows (and libraries built like them).  I understand that is more difficult.

yes, I think the big man is working on those.  It seems, from his earlier posts that the way they were being created did not fit some parameters or something.  I'm sure we'll get an update in the near future.  Then we'll just need this to work on TV shows (and libraries built like them).  I understand that is more difficult.

Agreed... MovieFan has been awesome in his support of this tool.

I just wanted him to have my latest log file, since this is the first time it has given an actual error.

In the past, it simply stated "file saved successfully" even though it didn't.

Oddly, I believe that on my smaller Libraries, there were also some posters that I had used http: to acquire, and yet I don't remember it having any problem writing those out.

Yup, your problems are the same.  If you look in the log you will see "http" in the entry for the files that did not download.  This is the code I had left out.  Working on it now.  I think I know why the false positives too.  I am now comparing file size of the source to the destination to determine if the file was correctly copied.  With the error, the source is 0, so the destination becomes 0, and since 0 = 0 it thinks it worked.

Just to prove things...

I took the http path from the log file and pasted it into a browser.

Sure enough, there was the poster image (from TMDB.com).

I saved the image locally as poster.jpg.

I went into PlexWeb and updated the Apollo 13 movie poster to use the one saved locally.

I deleted the poster.jpg in the movie folder.

Re-ran the script for extraction...

Bingo.

It finally created a local "Apollo 13.jpg" (poster) file.

Looking forward to your next update.

Thanx again for your efforts.

Ran into a small issue but working on it.  

To explain why it doesn't work now, when PMS uses that http link it does not actually download the image, it just creates the small thumbnail so you can select it from the edit page.  My script is expecting to find an actual file but that http throws it for a look, which is why I left it out.  Instead of just a simple file copy, I need to extract the URL and download the image from the internet.  It can be done, just running into some small issues.  Should have it sorted soon.

Ran into a small issue but working on it.  

To explain why it doesn't work now, when PMS uses that http link it does not actually download the image, it just creates the small thumbnail so you can select it from the edit page.  My script is expecting to find an actual file but that http throws it for a look, which is why I left it out.  Instead of just a simple file copy, I need to extract the URL and download the image from the internet.  It can be done, just running into some small issues.  Should have it sorted soon.

So are you saying that every time Plex shows me that image, it actually goes out and gets it again?   And that even though, when I select "enter to upload" (which really should read download in my opinion) and it then responds with "this artwork was uploaded successfully" it doesn't actually copy the file into the Plex Database Cache?  Doesn't this mean that if the source file becomes no longer available on the internet, then Plex cannot show it?

If this was true, then following the same principle, if I were to use the "drag and drop" method of choosing artwork... does Plex look out to my local file system each time it shows me that image?  What if I were to move or delete that file?

I have to be misunderstanding this.  :unsure:

This is what confused me.  When I use the URL link to add a poster, the link in the database is "upload", which does download the image and my script works on that.  It does not use "http".  I'm thinking the "http" link was an old method that is not used anymore to avoid this actual problem.  Can you try reselecting the same image by re-entering the URL and see if it still uses "http" of if it changes to "upload"?

Ok, so same movie... Apollo 13:

Went into PlexWeb and edited the poster...

Chose any old image file on the internet... (a beautiful picture of Lake Tahoe)

Put the URL into the poster edit field...

"image uploaded successfully"

And of course Plex automatically selects that image...

Saved changes...

Did not delete the previously written "Apollo 13.jpg" file in the file system...

Re-ran the extrication tool...

Checked the log file (for that specific item) and got the following:

05/19/2015  22:59:31 C:\Users\Studio\AppData\Local\Plex Media Server\Metadata\Movies\6\e9c9acba4fd6632916eb7b35cd62d57edac6431.bundle\Uploads\posters\61f6ee7575e9c2a4ddd9eac5590f6872a5679354 ==> M:\DVDs\Apollo 13 (1995)\Apollo 13.jpg : Overwriting Successful
 
Checked the file system and it was the new poster that I had "uploaded" using the PlexWeb editor.
 
There is no reference this time to "http" even though that was the way the image was acquired.
Does that make sense?

Yup.  Looks like there was a change in the way PMS handles internet images.  Either way, I got it fixed.  So it should be able to handle the old http method as well as new method.  I was also able to remove the delay as that was not actually needed.  Let me know if there are any more problems.  The only one I can think of now is if you have too many movies, the logs may stop reporting.

Unzip and replace current file.

MovieFan's Database Tool for Plex v0.3.2 - Library.mscr.zip (6.69 KB)

Edit - When you run into a file that uses the old http method, you will see another pop-up showing the actual download from the internet.  The download will not occur if the file already exists.  There is no way of knowing if the file that already exists is the same as the one to be downloaded.  The only options are either always download or only download if there is no file.  I chose the latter.

Seems to work perfect.

All files appear to be written.

Now the only problem is that it appears that Apollo 13 splashed down in beautiful Lake Tahoe (I forgot to change the poster back  :rolleyes:).

Thanx again for your help.

[Edit: Changed Apollo 13 poster back, re-ran script, updated new poster to file system - perfect]

Thanks for working on this.  I will run my library through this evening when I get home from work.

Out of curiosity, how is the data stored differently in TV Show libraries, Home Movies, even Music? It must be in the database because I have folders and sub folders in my movies and that works fine.  Just curious.

Thanks again!!  Now I just need to figure out all the rest of the glorious features of your program!

Home movies are the same as regular movies and should be listed in the libraries that this will work on. Tv shows or home videos using the series scanner are stored with 1 entry for the show, individual entries for the seasons, then for the episodes. The hash value which is used for the directory path is connected to the show. So to get the season and episode images i need to link them back to the show to get the path. Right now i can get my script to work but it does all the show images, then all the season images, then the episodes. You just get an odd listing in the output so it is hard to tell if it is working right from the logs. Music is similar but with only artist and album, 2 levels. I’m trying to workout how to get it to group by show and artist, respectively.

Thanks for the explanation.  That makes sense.  It would be a great addition to have the setting in the PMS to "Save native artwork to the media directory" and let it do it when it is chosen.

Also, just to be sure I understand from a previous post...If, after I have run this, my wife decides she likes a different poster better, do I just delete the two jpg files for that particular movie and then just rerun the program again?  Or is there a better way to do this?

The script will check if the chosen picture matches the size of the one already on disk and will overwrite if the size is not the same.  So, all you need to do is just run the script again and it will skip everything except the one that changed.  The only exception are the odd entries with the http, these will not get re-downloaded.  However, if you change these in the editor, it should use the new "upload" key instead and the script will be able to detect the file is different and should overwrite as well.

I can use at least two of these

Hi Guys,

Just migrating movies from my pc to my shiny new NAS (QNAP TVS-863+) and the movie metadata is all over the shop. The music has just finished updating, and I have a weeks work there.

Are there any other metadata agents I can use? XBMC never had an issue with this (the rest was fairlt difficult), so are there any fixes/and or plans to update?

Are there any other metadata agents I can use? XBMC never had an issue with this (the rest was fairlt difficult), so are there any fixes/and or plans to update?

Agents to do what exactly?  Did you post in the wrong spot?  My tool has nothing to do with agents.

Just tried this and it worked great!!  Now if I can just figure out what happened to my database..new topic in Ask a ninja.  Very odd.

I'm trying to use this tool to find the unavailable files in my library after a hard drive failure. I know for a fact there are many of them in there but the tool says that 0 files are missing. I'm also trying to use the findmissing.bundle plugin but it just keeps refreshing before I can get an accurate list of the files are missing. I include this bit of information because I know through that tool that there are a few hundred files that should be listed.