xbmc/xbmc — pull request #1760 by jmarshallnz (2012-11-10 20:04:06+00:00)
Title: Art fallback fixes, and don't save show/album/season art for seasons/songs/episodes

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.