2015-08-25, 08:26
A better multi fanart display for individual items, to replace extrafanart.
I've been working on a new add-on, Artwork Beef, for handling extended artwork, multiple fanart included.
Use Artwork Helper below to easily stitch together the images for 'multiimage' controls for skins, though a similar effect is possible without a plugin if you populate a 'list' with fanart as static content and use autoscroll to flip through it, instead.
This is mostly in the context of my changes to Artwork Downloader, but really I would like this to be a near-standard, like the artwork types clearlogo/landscape/etc, so that skins and your media manager apps and anything else can use them just as easily.
I had previous cobbled together an update to Artwork Downloader that adds extrafanart into the library as 'fanart#'; skins can pull them up just like fanart/posters/clearlogos with $INFO[ListItem.Art(fanart1)] and so on. The code is generally set up, but it needs more eyes and ideas (test it and tell me what you think).
Why?
How to add them
General effect
The intention is that the upgrade from 12.0.29 to 12.0.30 won't have much of a noticeable impact unless a skin is using it. By default it will still download extra fanart to the 'extrafanart' directory next to the media.
There is also a bulk mode that simply inserts all local classic extrafanart into the library, so that when you want to use a skin that supports these images it's easy to make sure they are all in the library. It is available under settings, General, "Ensure classic extrafanart is in library". Skin designers can then use this new multi fanart across the whole library, based on a skin setting or whatever, rather than on a per-item basis.
Give it a poke
extrathumbs
The extra fanart already includes movie thumbs, if any are available and rated high enough.
I've left Artwork Downloader's extrathumbs handling the way it is for now; it downloads resized (780x439) fanart from TMDB to the 'extrathumbs' directory. I'd consider pulling these in too, if it provides a good amount of usefulness and performance improvements on lower powered devices, like the Raspberry Pi. I don't have such a device, so to those of you that are familiar with them, what do you think?
Artwork Helper to display them
Download script.artwork.helper v0.5.2 WIP, or install my dev repo repository.rector.stuff to keep updated during development.
ListItem multi image plugin path
The simplest form grabs multiple images for the currently focused ListItem, suitable to populate a multiimage or list control.
Mostly for fanart (fanart#), but works for any art type that has one or more images. Additional query params are available to modify its behavior, separate them with &&.
- refresh is required to get Kodi to fire off the plugin when the focused item changes. Set it to something that will change when the fanart should change (ListItem.DBID, or ListItem.TVShowTitle for series fanart when listing episodes/seasons)
- containerid points to an alternate container
- arttype lets you select different artwork. tvshow.fanart is a useful alternative for a list of seasons/episodes.
- shuffle shuffles the list, maybe useful if you aren't using a multiimage control that can randomize it
With the full complement of options:
Arbitrary images plugin path
This format lets you stitch any images together into a list, by specifying their path.
When the ListItem option above doesn't work for you, this is your very wordy friend. Repeat the image block for as many images as you like, and it will ignore empty ones. The double ampersand && separator between images is required.
I've been working on a new add-on, Artwork Beef, for handling extended artwork, multiple fanart included.
Use Artwork Helper below to easily stitch together the images for 'multiimage' controls for skins, though a similar effect is possible without a plugin if you populate a 'list' with fanart as static content and use autoscroll to flip through it, instead.
This is mostly in the context of my changes to Artwork Downloader, but really I would like this to be a near-standard, like the artwork types clearlogo/landscape/etc, so that skins and your media manager apps and anything else can use them just as easily.
I had previous cobbled together an update to Artwork Downloader that adds extrafanart into the library as 'fanart#'; skins can pull them up just like fanart/posters/clearlogos with $INFO[ListItem.Art(fanart1)] and so on. The code is generally set up, but it needs more eyes and ideas (test it and tell me what you think).
Why?
- Kodi's new-ish support for arbitrary artwork in the library is pretty great, so let's use it!
- Avoid filesystem delays/access issues (unavailable network filesystem, removable media) when the images have been cached. Classic extrafanart always had to hit the filesystem once when the path changed to get a list of all extrafanart, even if they were all cached.
- Skins can more easily work with all fanart together (main + extra fanart)
- There are plugin:// paths to stitch together fanart images for 'multiimage' controls, 'fanart' and 'fanart#' alike! See Artwork Helper below.
- Skins don't have to worry about any particular media not having extrafanart, so that they need to display the main fanart or risk leaving a gaping hole.
- Skins can look up each fanart image directly, which makes it simpler to display more than one at a time in arbitrary locations. I think I remember playing around with a Nox way back in the day that did this with extrathumbs.
- It works for items in the library that may not point to a location on a filesystem that should even care about artwork on this/any level, maybe a movie from UPNP or whatever.
- Should generally work for some other library items that can have arbitrary artwork; movie sets, music videos, TV show seasons and even episodes, if you desire.
- Get that gross nasty other stuff out of your filesystem, if you also think it is gross and nasty.
How to add them
- I have modified Artwork Downloader to use this new process for extra fanart, so if 'extra fanart' is enabled in AD settings it will add them to the database.
- If you have them locally they can be added individually like all other fanart from 'Choose art' on VideoInfoDialog.
- They can be added easily with JSON-RPC methods VideoLibrary.Set*Details from any other application.
General effect
The intention is that the upgrade from 12.0.29 to 12.0.30 won't have much of a noticeable impact unless a skin is using it. By default it will still download extra fanart to the 'extrafanart' directory next to the media.
There is also a bulk mode that simply inserts all local classic extrafanart into the library, so that when you want to use a skin that supports these images it's easy to make sure they are all in the library. It is available under settings, General, "Ensure classic extrafanart is in library". Skin designers can then use this new multi fanart across the whole library, based on a skin setting or whatever, rather than on a per-item basis.
Give it a poke
- Make a backup of your video database. It's most likely not going to do anything other than what it's always done plus add some 'fanart#' into your library art, but just to be safe.
- Download a development version from Artwork Downloader 13.1.1~dev and install it from zip.
- Fire up Artwork Downloader settings and enable 'extra fanart', then hit "Ensure classic extrafanart is in library", and it'll do its process for a bit.
- In your skin, change the extrafanart 'multiimage' control's imagepath to the plugin path above, changing all instances of ListItem to whatever you may need.
- Navigate around in the skin into windows that use the extra fanart, and see if it all works.
- ! Tell me what you think! I've surely missed things, my system is set up differently than yours, you've probably got a better idea for such and such, and so on. I want to hear anything you've got.
extrathumbs
The extra fanart already includes movie thumbs, if any are available and rated high enough.
I've left Artwork Downloader's extrathumbs handling the way it is for now; it downloads resized (780x439) fanart from TMDB to the 'extrathumbs' directory. I'd consider pulling these in too, if it provides a good amount of usefulness and performance improvements on lower powered devices, like the Raspberry Pi. I don't have such a device, so to those of you that are familiar with them, what do you think?
Artwork Helper to display them
Download script.artwork.helper v0.5.2 WIP, or install my dev repo repository.rector.stuff to keep updated during development.
ListItem multi image plugin path
The simplest form grabs multiple images for the currently focused ListItem, suitable to populate a multiimage or list control.
Code:
plugin://script.artwork.helper/multiimage/listitem/?refresh=$INFO[ListItem.DBID]
Mostly for fanart (fanart#), but works for any art type that has one or more images. Additional query params are available to modify its behavior, separate them with &&.
- refresh is required to get Kodi to fire off the plugin when the focused item changes. Set it to something that will change when the fanart should change (ListItem.DBID, or ListItem.TVShowTitle for series fanart when listing episodes/seasons)
- containerid points to an alternate container
- arttype lets you select different artwork. tvshow.fanart is a useful alternative for a list of seasons/episodes.
- shuffle shuffles the list, maybe useful if you aren't using a multiimage control that can randomize it
With the full complement of options:
Code:
plugin://script.artwork.helper/multiimage/listitem/?refresh=$INFO[ListItem.DBID]&&containerid=4250&&arttype=tvshow.fanart&&shuffle=true
Arbitrary images plugin path
This format lets you stitch any images together into a list, by specifying their path.
Code:
plugin://script.artwork.helper/multiimage/?image=<image_path>&&image=<image_path>&&image=<image_path>&&image=<image_path>&&image=<image_path>&&image=<image_path>
When the ListItem option above doesn't work for you, this is your very wordy friend. Repeat the image block for as many images as you like, and it will ignore empty ones. The double ampersand && separator between images is required.