Cover cropper - Creating Kodi style poster files from covers

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,599
4,964
The cover structure you have doesn't check for the suffix so in that state, it just loads the first thing it can get an image size of, which ended up being a movie for some reason(you can see it in the status bar)... not sure how that's possible and that's why it stopped, it's trying to load a movie as an image.

Using [code]/[any][suffix][any].[any] should detect the cover better in your case, but I'll see if I can reproduce this to figure out how it did that.

Edit: I see, the code gets set to "AEGE-017 ((Unknown))" because that's the dir name so the only match is the mp4 and there must be a bug where it gets loaded anyway if it's a perfect match somehow, gotta figure that one out.

Edit2: ... it doesn't do the image check if there's only one result, that's definitely a problem I need to fix.
 
Last edited:

Fetterbr

Member
Dec 10, 2010
51
2
Hi.
After a day or 2 i tryed to rerun the folder because i downloaded a few new muvies, but now it stops randomly on any number, some times it stops on 25,tham 82 or whatever. the total is also wrong i think. see picture
 

Attachments

  • Capture.JPG
    Capture.JPG
    94.9 KB · Views: 3

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,599
4,964
Does it always stop at 749 for the total?

Since the status bar is still showing the root path, that means it skipped all the ones it processed and seems to crash while checking all of the folders for covers. The numbers start going up as soon as you open up the path so it must stop pretty quickly if the first number is random.

I'm assuming something is different inside one of the new folders you added and somehow made it crash, that's one gonna be trickier to figure out. If you can see something that would be different in one of them, it would help, else I'll likely have to add an output for the errors and have you try it, unless I can see something obvious that's not handled.

Edit: Made a new version with the fix from last time and extra error handling at the most likely place it could crash for this problem(should show a message box and continue after. Let me know what the message box says if it appears) and it'll display the last folder it scanned in the status bar so the problematic one should be the one after(knowing what it is and its content would help me reproduce the problem).
I added the link to the first post but here it is also: https://www.mediafire.com/file/mkjnt4ddd18ai6b/Cover_cropper_v1.1.7z/file

I did try a fully auto scan with poster skip and it was keeping up with the total so seems a bit odd you're so far behind, but it could be because I was doing it over the network or something.
 
Last edited:

Fetterbr

Member
Dec 10, 2010
51
2
When the system brings up a box like this i assume when it says press the cover it means the picture with left and right picture. The one i call Fanart.
The right picture only is for me the Poster. Its just because i have got some funnt pictures as Poster and i believe its because i press the wrong.
 

Attachments

  • Capture 1.JPG
    Capture 1.JPG
    126.3 KB · Views: 2

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,599
4,964
I used the term cover for the source image since usually it will be a DVD or BluRay cover, but it can be anything. And yes, I use the term poster for the cropped final image, which is usually the right part of said covers but can be any part if you select it manually.

The detection has maybe a 90% success rate so you have to fix a few since you used full auto(I made the semi-auto mode to detect potential duds and fix them right away instead of later and still have most of them get cropped automatically).
Looking at that first one dimensions on your screenshot, it's not the usual aspect ratio for them(looks like poster dimensions) so it'll likely give a weird result on auto-mode since that picks the first. It's supported to use a poster as the source if you manually resize the selection but I haven't added detection for that scenario yet. I plan to though since studios like Dandy have the front and back separate on their website.

Does this mean the previous problem you had went away since you're not mentioning it now?
 

Fetterbr

Member
Dec 10, 2010
51
2
I used the term cover for the source image since usually it will be a DVD or BluRay cover, but it can be anything. And yes, I use the term poster for the cropped final image, which is usually the right part of said covers but can be any part if you select it manually.

The detection has maybe a 90% success rate so you have to fix a few since you used full auto(I made the semi-auto mode to detect potential duds and fix them right away instead of later and still have most of them get cropped automatically).
Looking at that first one dimensions on your screenshot, it's not the usual aspect ratio for them(looks like poster dimensions) so it'll likely give a weird result on auto-mode since that picks the first. It's supported to use a poster as the source if you manually resize the selection but I haven't added detection for that scenario yet. I plan to though since studios like Dandy have the front and back separate on their website.

Does this mean the previous problem you had went away since you're not mentioning it now?
I have been reading up about issues with windows explorer and Javluv and it seams to be a problem when you get around 4000 movies and in connection with Onedrive somehow. I am not quite sure but it has problems showing the right data in explorer sometimes, seams like its slow in updating. As soon as i see the problem in your program i make a restart of windows and the problem is gone for the time being. its for sure not your program i think. I have got an issue that the program makes copies of the cover and gives same name just with Poster at the end but i haven't been able to replicate it.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,599
4,964
Oh, I see, windows with syncing folder could possibly cause issues, good to know. I was already handling permission errors and I've added a catch all for other issues with listing the folder in v1.1, but I guess if it has issue writing back to those folders when trying to save the poster if they're temporarily locked by syncing or something like that, it could produce the behavior you had.

Do make sure you check the actual picture if you see the poster shows up as a cover and not just tell by looking at a thumbnail. I ran into this issue when testing with my covers. A few of the cover files had internal thumbnails that remained once cropped. I added code to strip those out so they shouldn't remain but I didn't have many to test with so maybe they could remain for some files.
If the actual poster image is still the cover, the only way this could happen, that I can think of, would be if imagemagick thought the values for cropping didn't make sense and it just did nothing and outputted same size as the original but I'm not sure how this could happen.
 

Fetterbr

Member
Dec 10, 2010
51
2
here for instance it has created a poster but with a totally different name. As you can see i have clicked ignore when poster excists.
 

Attachments

  • Capture1.JPG
    Capture1.JPG
    70.6 KB · Views: 3
  • Capture2.JPG
    Capture2.JPG
    65.1 KB · Views: 3

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,599
4,964
The way it works is that it lists all the files in a folder when it scans it, finds the cover for the folder, decides which poster files should be saved, in your case it uses the movie name so it'll scan all the movie files in the current folder and save a poster for each of them.
It doesn't match the movie filename to the cover name in case the person uses different names for them.

What it looks like to me is that you had 2 video files in the same folder when it got scanned, "JKNK-041 (2016)" and "VVVD-205 (2022)" so it made poster files for both from the first cover it found.

You're only showing image files in the folder so I don't know if you happened to scan when javluv had multiple videos in a processing folder or something(not sure how it works exactly) or if there's more than one video in there now.

It can save more than one poster file for cases like this where there can be multiple version of the same movie:
Multi-version.jpg