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
[VideoInfoScanner][GUIDialogVideoInfo] Update blank movie sets with artwork from Movie Set Information Folder #24131
Conversation
@78andyp thanks for the PR. Need to say that this code area is not something I'm familiar with, so cannot say anything about correctness of the implementation, especially not, whether the place you added the code is appropriate. I hope somebody else can pick this up for review. |
Nice feature. Thanks!! Is there an option to update individual sets instead of a full library update? |
Do mean like as a context menu option for the individual set?? I can certainly look. |
More like video info dialog, add support for button „refresh“. This is how it works for other items as far as I know. |
So it will only populate BLANK movie sets? I did a clean re-install of KODI 19, but my media all had set information in their NFO files. The sets were thus recreated. but KODI generated the set art. I already have a fully populated MSIF folder. How do I reassign the art in my MSIF folder to the existing sets? |
Can I just check a couple of things: You have the MSIF set in Settings -> Media -> Videos -> Movie Set Information Folder?? If both of those are true then it feels like Kodi should look in the MSIF. I'll see what I can recreate here. |
Yes to both of those. I have been having an exchange on the KODI forum, and here’s what I posted:
****************************************
I did a new install of KODI 19.
I configured everything before adding any content, and that included specifying the MSIF folder. The MSIF had been created with my previous installation, and I saw no need to re-create it for the same content.
My movies all had NFO files along with the video in their individual folder. These NFO's all had set information.
I wasn't creating any new sets.
I initially specified Use Local Information as my information provider to grab the info from the local files. After the movies were in the library, I changed the scraper to Universal Movie scraper for future additions.
I found that KODI had generated/assigned random art (from the included movies) to most of the existing sets. Others, it left blank. It didn't use the MSIF folder art.
I would like to avoid having to go through the movie sets one-by-one to assign the correct art. If that's not possible, then using MSIF is not much use to me other than providing a storage place for movie sets, to which the user had no access previously, at least to my knowledge. Not an insignificant feature, and I'm glad to have it. I just thought I would be able to replace the KODI-assigned art with my previous assignments. Apparently, that is not the case.
If I can delete the libraries and add the content in some other way so that it would grab the set artwork from the MSIF, it would probably be faster than manually assigning set artwork.
From: 78andyp ***@***.***>
Sent: Saturday, 25 November, 2023 7:25 PM
To: xbmc/xbmc ***@***.***>
Cc: hurricane51 ***@***.***>; Comment ***@***.***>
Subject: Re: [xbmc/xbmc] Update blank movie sets with artwork from Movie Set Information Folder… (PR #24131)
So it will only populate BLANK movie sets? I did a clean re-install of KODI 19, but my media all had set information in their NFO files. The sets were thus recreated. but KODI generated the set art. I already have a fully populated MSIF folder. How do I reassign the art in my MSIF folder to the existing sets?
Can I just check a couple of things:
You have the MSIF set in Settings -> Media -> Videos -> Movie Set Information Folder??
You have Local Information Only set in the Choose information provider option of the Sources??
If both of those are true then it feels like Kodi should look in the MSIF. I'll see what I can recreate here.
—
Reply to this email directly, view it on GitHub <#24131 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AETWG32HY3BMQEBYF4J2QVDYGHPQFAVCNFSM6AAAAAA7W2YJZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGI4TMMRSGQ> .
You are receiving this because you commented.Message ID: ***@***.***>
|
I'm not sure we want/need this, tbh. AFAIK. for all other media types we are managing this using the video info dialog's "refresh" button. I don't see why we should do this differently for movie sets or why we need another way in addition to the dialog. |
Because 'Choose art' option is there already so it makes sense (to me at least) to have the 'Use local art' option there as well. |
I see it more the other way round. Having „choose art“ in the context menu is superfluous and should be removed, because we have the dialog for that. Why add same functionality at different places? All this code needs to be maintained… |
Have you tried it with the latest beta of Kodi 21?? What OS are you using?? I've just deleted local database completely and manually generated 3 NFOs for Predator, Predator 2 and Predators - naming the Set in the NFO as Predator Collection. Each directory is just the movie MKV and movie.nfo. I then set the source to local, set single movie in each directory, set scraper to local. I then set MSIF directory and created subdirectory Predator Collection with just poster.jpg in it. I then ran scraper for first time and it found the set artwork automatically. |
The conversations in this PR is strictly for feedback on a new feature, NOT your support requests. Please stop hijacking this conversation. Please ignore hurricane51. He was being offered support on the forum, but he discontinued... https://forum.kodi.tv/showthread.php?tid=375147 |
Agree, should probably be both or neither. I personally tend to use context menus (probably as come from a windows centric background). |
I've used the existing refresh button - it now should appear if there it's a blank set and a folder in the MSIF. |
xbmc/video/VideoInfoScanner.cpp
Outdated
@@ -1672,7 +1673,7 @@ namespace VIDEO | |||
CFileItemList availableArtFiles; | |||
CDirectory::GetDirectory(path, availableArtFiles, | |||
CServiceBroker::GetFileExtensionProvider().GetPictureExtensions(), | |||
DIR_FLAG_NO_FILE_DIRS | DIR_FLAG_READ_CACHE | DIR_FLAG_NO_FILE_INFO); |
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.
I changed this (removing DIR_FLAG_READ_CACHE) as I found that if you add a file to the MSIF once Kodi has started it never gets found on subsequent searches. GIven the MSIF will only contain a small number of files I would have this doesn't have a performance impact.
Have a requirements issue with the use of "refresh". In every other context "refresh" finds a local nfo or configured scraper to update the info. Here, "refresh" won't update the set overview or set membership making it a one-off. |
OK, thanks. I'll add an update button. |
Yet another button in the dialog that is already crowded with (way to much) buttons? And will users know the functional difference between update and refresh. It’s just different words for same thing basically. For example, in German both words would even be the same. |
If this „refresh“ introduced with this PR is functionally different from the usual „refresh“ functionality it should have its own button, but this button should have a label that is not generic, but hitting the point so that users have a chance to understand what it actually does. |
I've added an 'Update Local Art' button Once Jenkins has done it's thing, i'll merge the diff and resubmit one commit as it's all over the place now. I've also taken the non-refresh of the library screen out and will submit that as a seperate PR as it is a bug that effects the existing choose art as well - see #24176. |
fb205f5
to
029f25e
Compare
7c010d3
to
1d13ffa
Compare
1d13ffa
to
3a593e6
Compare
765aa12
to
a742184
Compare
a742184
to
7fc832c
Compare
First of all thanks for your enthusiasm and many PR! It's just bad timing for reviews with the video versions things and (hopefully) close to a release. Reading the previous comments, I'd also prefer a "Refresh" button in the info screen, consistent in placement and behavior (in spirit at least) with the other uses of the dialog. To me it means that the art would be set from the MSIF when blank, and updated from the MSIF when not blank. The processing triggered by library scan (all library or single path) doesn't have to change because of the above, setting only the missing art would be consistent with the way movies are scraped as far as I know. |
I guess the only difference would be this is not a true refresh - we're not going back to scraper source and updating all the set info, just the art. Also, the languate 'use local art' is used on the context menu - so there would be a discrepancy there.
The code currently doesn't change the art if there is art already present, only if the set is blank. The wiki says 'If you do not use local artwork, and rely on the scrapers to provide your artwork, then there is no requirement for you to use this feature.' - so this would seem to imply that scrapers should take priority over local art (unless in this case there is no scraped art).
|
ah yes you're right, a true refresh would attempt to grab the online source first. edit:
You're not required but can press Refresh, and in the case of movies, will receive a popup asking whether to use local or remote info |
ok forget the idea, maybe as a phase 2 if you feel up to it in the future :-) |
As far as I can see there are really only 3 elements to a set - the title of the set, the overview of the set and the artwork of the set. You are right, remote artwork could be added in the future even without a movie content change and a proper refresh should take that into account, but as you say, it would need a popup as it seems local should always trump remote and if this PR sets local artwork now - does it matter if remote artwork is updated in the future. Happy to look at that for a future PR. |
…rtwork from Movie Set Information Folder.
9bf782b
to
1669177
Compare
Thinking out loud here, not requesting changes but looking for feedback on the idea. Now that I am more familiar with artwork handling, I'm thinking that instead of adding a context menu button / button in info dialog, maybe the function could be integrated in the existing Choose art dialog (after the selection of the art type)? The shortcut would lead to the MSIF of the set, not the top level MSIF folder. The example screenshot in the wiki shows multiple instances of each art type, I don't know how representative of the reality that is - and is your code prepared for that situation? |
m_database.SetArtForItem(setDetails.m_iDbId, MediaTypeVideoCollection, movieSetArt); | ||
} | ||
m_database.Close(); | ||
return movieSetArt; |
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.
It doesn't look like the returned art is actually used by the callers and a much cheaper true/false boolean would be enough?
m_database.GetArtForItem(setDetails.m_iDbId, MediaTypeVideoCollection, setArt); | ||
if (!isArt || !setArt.count("poster")) | ||
{ | ||
// Movie set currently has no artwork poster (other art types do not seem to be used) |
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.
Estuary uses the fanart when defined in addition to poster. I don't know about the other skins or about the automatic download.
Hi Thanks for the thoughts. I was thinking of going down a different route - but I think we can combine the two. Now we have potential refresh functionality I'm thinking that you anbd @ksoo were right at the start - refresh is better than a separate art update (which I agree with you - would probably be better in the choose art dialog with MSIF added). I was then going to extend the refresh set PR to make sure when a new set is added the MSIF is checked for art as well. I was also going to add support for a Then this PR could be closed. Looking to the future I was wondering if the whole set/movie version/(cinematic universe) could be simplified to nested sets. Each (nested) set could contain either further nested sets or streams (linking back to our previous discussions about playlists - a stream would either be 1 stream in a file or a playlist in an ISO). In theory seasons and episodes could be viewed as sets as well (where the overarching term set is really just referring to a collection), as could music videos. In essence then there would only be 2 significant entities - a stream or a set - at a database level. A set could be designated to be a season, a universe, a version collection, or just a set of sets (or whatever else we want) and then there would be GUI 'page' assocaited with each set type. Most set management would still be handled by the scrapers but the MSIF could then become just a set information folder where, for example, you could have within |
Thought I might ping @rmrector as he implemented the MSIF and he had ideas at the time for expanding its functionality. |
Superceded by #24557. |
There are now three ways the movie set artwork can be updated:
After 3 the library display isn't automatically updated - this is a different bug - see #24176.
Description
When a movie set is added by the scraper, sometimes there is no associated artwork, for example:
If, when the movie is added, there is an entry in the Movie Set Information Folder (as per https://kodi.wiki/view/Movie_set_information_folder) then any artwork from there is used.
Motivation and context
Obviously, you are't going to know if there is no set artwork until you've added the movie. Even if you then add artwork in the Movie Set Information Folder - it is never scanned again - you would have to add the artwork manually through the context menu.
If you have a number of sets to update - this is slow.
This PR rescans any movie sets with no atwork, when the library is updated, to see if there is any artwork in the Movie Set Information Folder and adds it automatically.
How has this been tested?
On my library in Win 11 x64.
What is the effect on users?
Easier to add movie set artwork - just need to setup the Movie Set Information folder (as per Wiki above) and then place a poster.jpg in a subdiretory with the name of the movie set. It will then be used automatically at next library update.
Screenshots (if appropriate):
Using above example:
After library update:
Types of change
Checklist:
I'm sure it's probably not in the right place in the code!