[MUSIC] Only set libraryartfilled property if we actually found art #24675
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Current code sets the property
libraryartfilled
to true, regardless of whether or not any art was actually found. This PR moves the setting to inside theif (artfound)
condition so that it's only set on an item if we actually did add some art to it.Motivation and context
With PR #21940 , playlists now accurately load the duration of a track from the m3u file. This results in the creation of a
CMusicInfoTag()
which contains just the duration. Before that PR, no infotag would have been created.The end result is that art is only looked up for the first item in the playlist (previously, items had no infotag and so were always looked up) and the rest of the items in the playlist end up with the
libraryartfilled
property being set. This prevents the thumbloader from loading any art when called by guiinfo.Fixes #24665
Moving the setting inside the if condition restores the correct behaviour.
How has this been tested?
Tested locally with the same playlist before and after the change.
What is the effect on users?
All items in an m3u(8) playlist will show all art items.
Screenshots (if appropriate):
Before change
Track 1 of playlist - shows fanart, album cover etc
Track 2 - just album cover, no fanart
Track 3 - no art at all
After change
Track 2 - all art
track 3 - all art
Types of change
Checklist: