WIP I wanted a better multi fanart display, so I did this! What do you think?
#1
Brick 
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?
  • 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
  1. 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.
  2. Download a development version from Artwork Downloader 13.1.1~dev and install it from zip.
  3. 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.
  4. 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.
  5. Navigate around in the skin into windows that use the extra fanart, and see if it all works.
  6. ! 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>&amp;&amp;image=<image_path>&amp;&amp;image=<image_path>&amp;&amp;image=<image_path>&amp;&amp;image=<image_path>&amp;&amp;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 &amp;&amp; separator between images is required.
Reply
#2
i'll move this to SKin Dev.
hopefully you'll get some responses there ;- )
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
This sounds fantastic. I think this should resolve most of the issues I have with implementing extrafanart. Will give it a go when I get a chance.
Reply
#4
One little note...

In your plugin path entry, you can also return a list with files.
That way you can return the actual extrafanart items and do the checking within the plugin.
Just add the directoryitems with the label and path set to the image file and it's all set.
Reply
#5
rmrector,

Thank you, probably long overdue. Will make extrafanart much easier to use for us skinners, but I think the calling convention used in your plugin is a bit verbose. Would it be possible to call the script with a line like this instead?

PHP Code:
<content limit="6">plugin://script.artwork.downloader/multiimage/?image=$INFO[ListItem.Art(extrafanart)]</content> 

So in example above give the first 6 extrafanart images in the library, and if NO limit given, just give whatever is there.

Wyrm (AppTV)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#6
(2015-09-28, 16:59)wyrm Wrote: rmrector,

Thank you, probably long overdue. Will make extrafanart much easier to use for us skinners, but I think the calling convention used in your plugin is a bit verbose. Would it be possible to call the script with a line like this instead?

PHP Code:
<content limit="6">plugin://script.artwork.downloader/multiimage/?image=$INFO[ListItem.Art(extrafanart)]</content> 

So in example above give the first 6 extrafanart images in the library, and if NO limit given, just give whatever is there.

Wyrm (AppTV)

This would be the preferred way for me too Smile


EDIT: Come to think of it, how would you use the <content> tag?
Reply
#7
(2015-09-28, 17:06)Gade Wrote:
(2015-09-28, 16:59)wyrm Wrote: rmrector,

Thank you, probably long overdue. Will make extrafanart much easier to use for us skinners, but I think the calling convention used in your plugin is a bit verbose. Would it be possible to call the script with a line like this instead?

PHP Code:
<content limit="6">plugin://script.artwork.downloader/multiimage/?image=$INFO[ListItem.Art(extrafanart)]</content> 

So in example above give the first 6 extrafanart images in the library, and if NO limit given, just give whatever is there.

Wyrm (AppTV)

This would be the preferred way for me too Smile


EDIT: Come to think of it, how would you use the <content> tag?

As you suggested as a List. So code would be something like this

PHP Code:
        <control type="group" id="945">
            <
control type="wraplist" id="950">
                <
left>-10</left>
                <
top>-10</top>
                <
width>0</width>
                <
height>0</height>
                <
viewtype label="31028">wrap</viewtype>
                <
autoscroll>true</autoscroll>
                <
scrolltime>4000</scrolltime>
                <
itemlayout></itemlayout>
                <
focusedlayout></focusedlayout>
              <
content limit="6">plugin://script.artwork.downloader/multiimage/?image=$INFO[ListItem.Art(extrafanart)]</content>
          
</control>
            <
control type="group" id="951">
                <
visible>Control.IsVisible(950)</visible>
                <
control type="image">
                    <
left>0</left>
                    <
top>0</top>
                    <
width>1280</width>
                    <
height>720</height>
                    <
texture>$INFO[Container(950).Listitem.Art(extrafanart)]</texture>
                    <
aspectratio>keep</aspectratio>
                </
control>
            </
control>
        </
control

I have probably make a number of stupid mistakes there, but that would be the general idea. I would fit it into my existing background code by checking that there is some items to display, otherwise fallback to a static image.

Wyrm (AppTV)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#8
You can just use a multiimage control for this
Reply
#9
Thanks all!

Spaced. I had decided against getInfoLabel early on because it wouldn't cover all my use cases, but nothing says we can't have both.

The basic path that works for many cases is
Code:
plugin://script.artwork.downloader/multiimage/listitem/?refresh=$INFO[ListItem.DBID]

More details in the first item under 'How to display them', including more options to make it useful in more cases.

Performance differences from the other plugin path seems to be negligible.
Reply
#10
Down with log junk!

Kodi can log quite a bit to NOTICE with these plugin paths that change a lot, 2 messages every time it changes. Most of that logging isn't particularly useful, and can grow into troublesome. There are two new pull requests, #8316 and #8319, that drop the logging level of these messages to DEBUG, so they don't show up in logs by default.

Edit: These pull requests were merged in Kodi 16 beta 1.
Reply
#11
I'm not having any luck getting Martijn's attention to get this into Artwork Downloader. I still want a real home for this, though.

I'm also considering breaking out the plugin paths to a separate add-on specifically for skin/artwork interactions. AD currently isn't a hard dependency for skins, and since artwork can be easily added through other means, it may make sense to keep it that way. This also gives it room for other options for skins to access these images or other artwork related options, while I hadn't wanted to bundle too much into AD.
Reply
#12
I think that would be great... Id use it as a separate addon, I get my images outside of kodi anyways....
Reply
#13
I've split the plugin paths out to a new add-on, Artwork Helper, with details at the bottom of the first post.

It's pretty unlikely that this is going to make it into Artwork Downloader. I've also got a bundle of other things I want out of an artwork doohickey, so I've been working on a new add-on. I should have something quite WIP to poke and prod in the next couple of days.
Reply
#14
And Artwork Beef has emerged, the new artwork doohickey I've been working on.
Reply
#15
All this has already been done in Artwork Downloader which is fully functional locally.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply



Logout Mark Read Team Forum Stats Members Help
I wanted a better multi fanart display, so I did this! What do you think?0
This forum uses Lukasz Tkacz MyBB addons.