Yeah, it worked great on one of my smaller libraries too (125 Video Clips), but went back to missing files on my full movie library.
Anxious to hear your results.
Thanx.
Yeah, it worked great on one of my smaller libraries too (125 Video Clips), but went back to missing files on my full movie library.
Anxious to hear your results.
Thanx.
Plexhilerated and MovieFan,
An observation and an odd problem:
Observation
When I ran the poster artwork save on my smaller libraries (70-100 titles), I had 2 each that would not get both images. Some got the poster and some got the background. I went into each, clicked the pencil, click Poster, click Background, click Save Changes (though nothing was saved). When I run the program again, they all showed up. So, on to the bigger library which has about 800 movies. 18 did not get both images (once again, randomly some missed both, some only the poster and some only the background).
So here is the observation - we are adding a large amount of movies in the last month or so and all of the ones that got missed in the script were added within the last couple of days. Hope this makes sense but, "all that were missed were added within the last few days" but "all that were added in the last few days were NOT missed".
I noted the ones that needed to be "edited" and went to bed. I got up this morning and "edited" each of them and ran the program....
Problem
When I went to run it this morning, I got an error about deleting (see screenshot attached). So, I can't tell you if just editing them and retrying it fixes them all.
BTW, the missed ones were a mixture of in folder and not in folders.
How am I just finding out about this? This is GENIUS!
Plexhilerated and MovieFan,
An observation and an odd problem:
Well this is more information than I could offer to MovieFan. I had never noticed any relationship with any of the movies that would not extract correctly.
I'll have to play with this more.
Let's hope this means something...
@rbeatse - That error is caused when the script finds a local image that needs to be replaced because either you changed the image (which sounds like what you did) or the old image did not match the size of the original that Plex has so it is trying to copy the image. Before it does this, it needs to erase the old file and the error indicates it cannot delete the existing file for some reason. I did not put in any checks to explain why so this may go unsolved.
@Plexhilerated - To both of you actually, the only reason I can think that the script is not able to copy the files is that the path to the original file is too long. The copy command is the basic version which may run into long path issues. PMS and most programs do not have this problem because they can actually use a different way to access files. If that is the case I may have a work around that I can try. I'll implement this in my new script. It is not nearly at the point I would have liked but i would like to release something soon to help you guys out. I'll see about getting a beta version out soon.
You...are....my hero. Saved me hours of work. If you lived in my town, I'd buy you a fancy steak dinner...and call you the next day to make sure you were okay.
Many thanks!
@Plexhilerated - To both of you actually, the only reason I can think that the script is not able to copy the files is that the path to the original file is too long. The copy command is the basic version which may run into long path issues. PMS and most programs do not have this problem because they can actually use a different way to access files. If that is the case I may have a work around that I can try. I'll implement this in my new script. It is not nearly at the point I would have liked but i would like to release something soon to help you guys out. I'll see about getting a beta version out soon.
Is there any way to see the file name that is failing?
One of my files that fails to write consistently is "Apollo 13"
Although it will create the Apollo 13.jpg (poster) file, it will not create the Apollo 13-fanart.jpg file.
I assume that the "path to the original file" is something embedded in the Plex database, and that getting this path is where it fails?
Just thinkin' out loud.
Just to add to the analysis, I deleted all of the jpg files from the folder where my largest library is and ran the program again. All but one of the movies that failed last time worked this time. Two new ones failed (added in the last 2 days) and one failed again. When I run it again after that, it fails again with the same error.
I'm not sure it could be the length of the file name since ones that failed before now work and the names/file paths would be the same.
Good luck and thanks.
I've had similar results when running the same script more than once. But at some point it no longer adds any new images to the file system. A file length error would never change, I also assume.
Hmm. Maybe the script is just too fast and one thing is not done before another happens. My new script is not ready yet but I have an idea to fix the current one. I'll upload an upload in a few hours.
Ok, guys. Here is an updated script. I changed the logging so hopefully no more false positives. I also added a small 10ms delay just in case the file being copied is not done before the next command runs to check if the copy was successful. This will mean the script will run an extra second for every 100 movies.
This is just 1 file. Unzip and overwrite the existing file.
I'll try to check it out when I get home tonight.
Thanx.
I ran it and it did take a few seconds longer. I had deleted all .jpg files again and then ran it. Two different movies (Dances with Wolves and Dawn of the Planet of the Apes) had the fanart created but not the regular jpg. Additionally, there is one (Eagles Farewell Tour) that it has not been able to find any of the last few times. So, I ran it again and the log shows all of the ones that already exist, good, but it says that the save was successful on the ones that weren't before. However, they are still not created. Attached is the log as well as a screen shot with the missing files for the two in the general folder. The Eagles files are in a separate file because the video is in two parts. Let me know if there is more I can provide.
[Edit - I removed the log since it is not needed anymore]
Ok, I know what is going on now. There is one way to load an image that my script does not understand and your missing posters are done using that method. I had put this off thinking it is very unusual but I guess I need to program this in. I'll get this fixed tonight. It still doesn't explain the false positive.
As for the Eagles file, I had not planned for multi-part files. I'm not even sure how the scanner picks up the poster for these. I'll need to investigate this and see what I can do. Thanks for the log.
You'll notice there are other folders than just the eagles ones that have multiple files (I think Ben Hur is an example). All of the other ones, it just duplicates the two jpg files for each of the parts.
Ok, I didn't even think about multi-part files so I guess duplicates make sense. I don't know how/if PMS will recognize the poster. Can you try moving out from your library a multi-part movie that did download the images, update library, empty trash, clean bundles, put files back, update library again? Just curious if PMS finds it. If not, can you try again, but this time rename one of the posters to just the movie name excluding the "pt -1".
Looks like the Eagles Farewell files are also using the non-working method. I guess this will get fixed automatically when I add that function.
I did the steps just as you asked and when I updated the library again after moving and deleting and emptying and moving and updating again..........success. The images were just as they had been before! Here is a screen shot of what the folder looked like with duplicate images, and they are the same image and same fanart image, just twice.
Thanks. Since it works this way, I won't bother looking for multi-part files and just let it create multi copies.
Trying to run the new scripts... getting this:
[Disregard... was using the wrong .mscr]
Still not writing all .jpg files though.
That’s the exact message I was getting. At least we’re consistent.