Art fallback fixes, and don't save show/album/season art for seasons/songs/episodes #1760

8 commits merged into from Nov 12, 2012


None yet
2 participants

jmarshallnz commented Nov 10, 2012

With the ability for JSON-RPC to set art for items, there's the possibility of art such as "tvshow.poster" to be set at the episode level. We don't want this, as otherwise that particular episode will always have that tvshow poster, even after the user changes the tvshow poster. This will pollute the database with entries that then need to be manually changed one by one via Choose Art.

To fix this, we store all parent art using the . pattern. e.g. fanart for tvshows is tvshow.fanart. This still allows season-specific fanart to be used (they can just specify fanart at the season level) and, indeed, even episode-specific if that's appropriate.

To pull this off, we need the normal generic ListItem.Art(fanart) to drop back to the appropriate art. Thus, we generalise the fallback already available for ListItem.Art(thumb) to allow other fallbacks. It happens at fetch time, as otherwise the art map is populated with these items that can't be eliminated.

Tested with old skins and all fallbacks working. Tested with new skins and all fallbacks working.

@Montellese, @MartijnKaijser the change is subtle, but it will mean that you'll no longer retrieve "fanart" and "thumb" at the episode or season level, unless they're set at that level. You'll instead retrieve "tvshow.fanart". Same with songs/albums - you'll get artist.fanart and probably also album.thumb rather than thumb at the song level.

Jonathan Mar... added some commits Nov 10, 2012

Jonathan Marshall [art] adds ClearArt to CGUIListItem 084d061
Jonathan Marshall [art] use a fallback map for art to generalise the fallback for the '…
…thumb' type, and set outside of CGUIListItem
Jonathan Marshall [art] adds a param to AppendArt to specify the prefix, and utilise fo…
…r setting art for children of tvshows, seasons + albums
Jonathan Marshall [art] use artist.fanart for artist fanart, and add fallbacks for fana…
…rt->artist.fanart and thumb->album.thumb for albums/songs
Jonathan Marshall [art] adds fallbacks for fanart->tvshow.fanart for episodes/seasons, …
…and container.thumb->(season|tvshow).(poster|banner)
Jonathan Marshall [art] don't add art from parent items when setting art on children in…
… the database
Jonathan Marshall [art] cleanup - no need for convoluted resetting of thumb now that it…
…'s just a fallback
Jonathan Marshall [art] set all art on the trailer when playing from video info 8f052f7

MartijnKaijser commented Nov 11, 2012

Tested with tvshows and works like it should.

ghost merged commit a6f70e2 into xbmc:master Nov 12, 2012

Yeah - I always say the same thing and never get around to it :p

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment