New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow video scrapers/NFO files/library import to add any artwork type… #12612
Conversation
The build failure for Win-64 looks like it was caused by something else. |
Sorry, this is not my territory. EDIT: Silly me. Removed myself from reviewers. |
Anyone have any thoughts on this? This is kind of important, a lot of folks like extended artwork and this has been a big hole in artwork support for awhile now (relying on an add-on seems unnecessary, scrapers can add some artwork so they should be able to add all of it). One hole is left, Kodi doesn't import extended artwork from image files next to media. I've got Python code that identifies these images just fine, but for some reason I just cannot translate it to Kodi core (C++ noob, gah!). |
@DaveTBlake was looking at imports and exports recently |
For music, scraping of video is different, but I am interested in how we can handle art better in core rather than leave it to addons. There is also #11755, which could be of interest. |
@phate89 You've been hard at work on bigger parts of the scrapers, what do you think of this? This code sits up a level higher, as a filter on the data from the scraper before it makes it into the database, and is still useful to your open PR #12661. @MartijnKaijser With all your work on Artwork Downloader, what do you think of scrapers being able to add more artwork? |
xbmc/video/VideoInfoScanner.cpp
Outdated
@@ -1397,6 +1378,18 @@ namespace VIDEO | |||
art.insert(std::make_pair("fanart", fanart)); | |||
} | |||
|
|||
// add online art | |||
std::vector<CScraperUrl::SUrlEntry>& scraperArt = pItem->GetVideoInfoTag()->m_strPictureURL.m_url; | |||
for (auto i = scraperArt.begin(); i != scraperArt.end(); ++i) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I'm not an expert of artwork code but it seems fine and also simpler. Why did you move the loop after fanart gathering? |
14a9e71
to
f489c22
Compare
I moved the loop because it can also provide a "fanart" image, but the original fanart section still offers an extra feature, the rarely-used fanart colors for skins, so they should take priority. I just added a bit that covers what the original |
Does this work for music scrapers also? |
@rmrector I really don't know anything but I always tought that fanart was only in |
f489c22
to
2f12f40
Compare
@zag2me The music library doesn't support the same wide selection of artwork as the video library in the first place, so it can't be extended this simply and is outside the scope of this PR. @phate89 This new code doesn't use artTypes when processing scraper artwork (artTypes is what held back the original code), but accepts the first image of each art type/"aspect" the scraper provides, so if the scraper sets an image aspect to "fanart" in I've also push another change to handle season artwork, which is in another section of code. One thing about season artwork is that it doesn't work from Python scrapers in master (with notspiff's initial Python scraper), but does look to be addressed in your PR. I haven't given it a test yet, but I intend to soon; the scraper process has some goofiness with artwork, and I think the Python scraper interface can smooth some of it out. Edit: And the WIN64 build failure looks unrelated, the rest compiled fine. |
d53c176
to
902eb79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the very minors and i will merge this. sorry for the long wait!
xbmc/video/VideoInfoScanner.cpp
Outdated
{ | ||
thumb = CScraperUrl::GetThumbURL(pItem->GetVideoInfoTag()->m_strPictureURL.GetFirstThumb(type)); | ||
if (!thumb.empty()) | ||
if (thumb.find("http://") == std::string::npos && |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
902eb79
to
a61e3e5
Compare
@notspiff ping. |
jenkins build this please |
@xhaggi i will do a follow up with the cosmetics, let's get this in now. |
Cool! |
you have an 'aspect' tag on the entry that can be "poster", "thumb", etc. |
Small adjustment to xbmc#12612 to keep backward-compatibility with NFOs exported from Kodi 11 Eden scrapers.
Small adjustment to xbmc#12612 to keep backward-compatibility with NFOs exported from Kodi 11 Eden scrapers.
… for items
Description
Scrapers (along with friends NFO files and library importing from single file XML export) can set any type of artwork (clearlogo, landscape, etc) for items in the video library.
This is such a simple loop change that doesn't disturb the beast that is scrapers, I so very much wish I had found it a couple of years ago when I first went looking for it.
Motivation and Context
The video library has long supported freely named artwork for items in most other places, now scrapers can set this artwork from the beginning.
How Has This Been Tested?
By hand, I modified the new demo Python scrapers and a classic scraper to set some extra artwork, and modified a couple of NFO files to match, then ensuring the results are what I expect. I also refreshed a few items with a regular scraper and ensured they still set their expected artwork.
Types of change
Checklist: