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.
[art] adds ClearArt to CGUIListItem
[art] use a fallback map for art to generalise the fallback for the '…
…thumb' type, and set outside of CGUIListItem
[art] adds a param to AppendArt to specify the prefix, and utilise fo…
…r setting art for children of tvshows, seasons + albums
[art] use artist.fanart for artist fanart, and add fallbacks for fana…
…rt->artist.fanart and thumb->album.thumb for albums/songs
[art] adds fallbacks for fanart->tvshow.fanart for episodes/seasons, …
[art] don't add art from parent items when setting art on children in…
… the database
[art] cleanup - no need for convoluted resetting of thumb now that it…
…'s just a fallback
[art] set all art on the trailer when playing from video info
Tested with tvshows and works like it should.
Yeah - I always say the same thing and never get around to it :p