Force detection of Cover.jpg instead of Folder.jpg ?
#1
I've spent the last few days experimenting with Eden and importing various sample sets from my library to learn how XBMC works.

I've got almost everything under control now, scraping and importing exactly as required.

I've also introduced an AdvancedSettings.xml file and used <thumbsize> to increase the max size of cover art and improve the display quality.

The ONLY thing I can't figure out is how to force XBMC to recognise local "cover.jpg" files instead of "folder.jpg" files as cover images (thumbnails?).

Is this even possible?

This is offered in advancedsettings.xml:

<dvdthumbs>
<remove>folder.jpg</remove>
<add>cover.jpg</add>
</dvdthumbs>

But that doesn't seem to be working for general video files, so I'm guessing that, as the name of the XML element implies, it's specific to DVD .iso files ?

I can work around the "folder.jpg" requirement if I absolutely have to but:

a. I have other media players besides XBMC accessing this collection that also rely on "folder.jpg" and need the image to be at a far smaller resolution than what I want to use with XBMC,
so I would prefer use a different filename altogether for XBMC and leave the existing folder.jpg images as they are.

b. I just can't believe that a system as powerful as XBMC does NOT offer a way to override the default file names. There MUST be a way to do that, surely?

I have a very big collection of movies with cover art, fan art and metadata all carefully hand picked and set exactly how I like it in the folders. So I WANT XBMC to use my local stuff before it even thinks about going to the internet for anything.

Yes, I'm a control freak Smile I like my stuff the way I like it.

Can anybody offer advice on this? I've done a lot of searching and digging around but I can't seem to solve this.




Reply
#2
The above tags should work fine. Note that XBMC only looks for a folder image during a scan if you have "movies in separate folders named after the movie" enabled.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Hi Jonathan

Those tags did look promising but they don't seem to be working.

I cleared my test library out and then put a cover.jpg and folder.jpg file into one movie folder. The 2 images are distinctly different so I can tell for sure what's going on.

It still pulled in the folder.jpg and ignored the cover.jpg despite those settings.

BUT, I know that it's seeing the advancedsettings.xml file now and parsing it because the other setting I enabled in there to increase the quality of the cached images IS working as desired.

I definitely have the "movies in separate folders named after the movie" setting enabled because all of my movies reside in their own folders with their own artwork and metadata.

Everything is working exactly as desired and XBMC is awesome btw, but it refuses to see cover.jpg as valid cover art for some reason.

Anything else I can try?

If my movies are .mkv files in a separate folder for each should the <dvdthumbs> tag definitely be applicable ?
Reply
#4
Update:

I removed all other cover images from the folder and left only the cover.jpg in there, then cleared everything and imported again.

That worked.

But then I cleared everything again, put a "folder.jpg" file back into the folder WITH the "cover.jpg" file and imported again from scratch.

This time the "folder.jpg" overrode the "cover.jpg"

But I have these tags in advancedsettings.xml:

<dvdthumbs>
<remove>folder.jpg</remove>
<add>cover.jpg</add>
</dvdthumbs>

That SHOULD mean that folder.jpg is ignored completely and ONLY cover.jpg is recognised, but that clearly is not the case.

It looks like the <add> tag is working, but the <remove> tag is not, and if both files exist then "folder.jpg" always takes precedence.

Could you please check your code Jonathan and see what's going on there?
Reply
#5
Code looks fine. Please check the cases (upper/lower) of your files. By default we check for "folder.jpg|Folder.jpg|folder.JPG|Folder.JPG".
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
I can confirm that ALL artwork files in that folder are lower case only.

V:\XBMC Test\Elektra\cover.jpg
V:\XBMC Test\Elektra\fanart.jpg
V:\XBMC Test\Elektra\about.jpg
V:\XBMC Test\Elektra\fanart1.jpg
V:\XBMC Test\Elektra\fanart2.jpg
V:\XBMC Test\Elektra\folder.jpg
V:\XBMC Test\Elektra\Elektra.xml
V:\XBMC Test\Elektra\Elektra.mkv

cover.jpg is being ignored if folder.jpg is in the folder with it, regardless of the tags in advancedsettings.xml

Are you sure that your code branching isn't resulting in that override? It seems like the <remove> tag is being ignored.

I'm a software engineer and have been for 18 years and I lead a dev team so I can't help but ask these kinds of questions and troubleshoot things like this Smile
Reply
#7
Your advancedsettings file exactly as it is loaded by XBMC is the first thing for you to checkout - top of the Debug Log.

I'll check over the code in the meantime.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
From my current log:

09:32:43 T:1492 NOTICE: Contents of special://profile/advancedsettings.xml are...
<advancedsettings>
<thumbsize>1500</thumbsize>
<dvdthumbs>
<remove>folder.jpg</remove>
<add>cover.jpg</add>
</dvdthumbs>
</advancedsettings>


To reiterate, this DOES seem to result in cover.jpg being picked up IF folder.jpg is not in the same folder.

It is loading the advancedsettings as I have it configured by the looks of it.

The core issue seems to be that IF folder.jpg exists everything else is ignored, regardless of the settings.
Reply
#9
You'll want:

<remove>folder.jpg|Folder.jpg|folder.JPG|Folder.JPG</remove>

as those are all the ones we support, and my guess is you're hitting one of the last 3 (due to case insensitive fs, or files named that way).

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
Bingo.

That would be the correct answer!

After all that, it's a case sensitivity issue again.

I probably should have come up with that myself in retrospect but it honestly never occurred to me.

I also didn't know you could pipe delimit the values like that inside a single tag. Would be worth updating the Wiki with that too.

I would actually suggest, however, that you consider changing the behaviour of the system regarding this particular tag.

If you think about it logically, if a person specifies that "folder.jpg" should be removed, it's pretty much implied that they mean all derivations of that name, regardless of case sensitivity.

I honestly can't think of any scenario, in the context of what this tag is intended for, where anybody would want to tell XBMC to remove "folder.jpg" but NOT "Folder.jpg" or "folder.JPG".

In this context all of the variants of that file name effectively mean exactly the same thing. So in theory, what I did originally, should have worked in this context.

Thanks for your help on this Jonathan and for your follow through. Excellent support.

Solved.
Reply
#11
Wiki is free to edit and update.
Just create an account and you should be good to go
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#12
Ah, I wasn't aware I could edit it myself.

Excellent, I'll make changes and update with what I've learnt so far.
Reply
#13
Thanks.

I agree that folder.jpg should have been enough. Unfortunately, generating all possible case differences that folk may use is not trivial, so instead of attempting to generate them all, we specify some semi-sensible ones and are done.

Most folk don't (and shouldn't need to) play with advancedsettings.xml anyway, and fewer again wish to get rid of folder.jpg.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#14
I don't think I was 100% clear on this.

What I actually meant was that the whole thing could be a lot simpler because in the context of this particular feature all you actually need to do is reduced EVERYTHING to lower case before you compare file names and THEN match if that tag is set in the advanced settings.

In other words your code should actually just ignore case completely in this particular situation because in this specific scenario, given this specific context, case is irrelevant to the task at hand.

If I want "folder.jpg" to be ignored, I want every variant of that file name to be ignored, so you don't need to get involved in any case differences at all in this case. All that needs to happen is that EVERY variant of "folder.jpg" in your filter must get removed / ignored.

I should also point out that you shouldn't be too quick to assume that most people don't want to search for other file names and don't want to ignore folder.jpg.

Based on the considerable amount of Googling and reading of articles related to XBMC scraping, library preparation, library management and artwork management that I've done in the last 2 weeks, I can safely say that there are actually far more people out there that probably WOULD like to configure these things than you might think, but don't know how.

I'm a senior level dev who has been doing this my whole life and isn't afraid to get down and dirty to make systems do what I want and I really did struggle to figure out how to do this initially. It wasn't obvious.

Your help with this was crucial to my understanding of what was going on and how to make this work. Which is why I've taken the time to update the Wiki with a verbose explanation of how it all works.

Reply
#15
That means retrieving a directory. Consider the user enters a folder with 1000 subfolders. Over a wifi connection. This takes time, which is exactly the reason we don't do it like this now.

It will actually be possible to do this once everything is in the texturecache - until then, though, it's best to leave things as-is.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Force detection of Cover.jpg instead of Folder.jpg ?1