Question about ListItem.Art(poster)
#1
It's been awhile so I think some things may have changed.

There seems to be three ways of accessing poster art:
 
Code:
#1   ListItem.Property.Art(poster)
#2   ListItem.Property(art(poster))
#3   Container.ListItem.Art(poster)

 My issue is that each one works differently in different places,

#1 displays perfectly in DialogVideoInfo.xml everytime, and in lists about 40% of the time. (most of the time I think we don't notice it because ListItem.Icon will display the thumbnail cache as a fallback in most skins, but it isn't always the poster image we expect, especially if you have a media file with a local %movie%-thumb.jpg image, that will always become the ListItem.Icon image)
#2 is the only thing that works in script-globalsearch-main.xml, and doesn't seem to work anywhere else. (this usage isn't documented anywhere making it very frustrating when trying to skin script-globalsearch-main.xml)
#3 also displays 40% of the time in a list, but never in DialogVideoInfo.xml

Oddly #1 and #3 work perfectly in lists after you manually set the poster to local on every file that is not displaying correctly, even though DialogVideoInfo.xml is already displaying the correct image as a poster to you before you tell it manually.

Can someone explain how the local scrapper appears to have scrapped the poster image about half the time but is showing 100% of the time in DialogVideoInfo?
Or is there a usage that will work to display the poster 100% of the time in lists like it does in DialogVideoInfo without the need to have the user manually set it first/again?
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#2
Generally ListItem.Art(poster) is the one to use. This works on media windows (Like My*Nav and AddonBrowser, but add-ons can create media windows as well) and Dialog*Info windows for the currently focused item (in the main window list, even if a secondary list is focused), and list controls can use this for each item in itemlayout and focuseditemlayout.

Container.ListItem.Art(poster) grabs the poster for the currently focused item in the currently focused list. Before Leia this usually needed a container ID (like Container(50).ListItem.*), but Leia expanded this to work for all windows and lists without an ID - the Home window in Estuary is one good example of its usage (the fanart and info along the bottom is much simpler to grab from all those lists), but this can also be used to pull artwork from a secondary list in MyVideoNav.

That Global Search window is from an add-on designed long ago, before add-ons could make media windows (some features have trickled in over the versions and I think Leia adds the last of them), and maybe even before they could set artwork likely Kodi does. Coincidentally ronie has been working on a rewrite for Leia that modernizes the whole thing, so the rules above should apply to it.

The 40% success rate could be caching failures: if the image is remote (a URL to fanart.tv or other web service) and Kodi doesn't already have it cached, it will try to download and cache the image, which may fail because of network congestion or other issues (images put a heavy load on free services, and during high usage some requests can be lost). Kodi leaves the image blank on that window, but will try to download and cache it again on the next window that wants to show it, though it doesn't update the window underneath. If you go to the home window (or maybe just to the parent list) and then back the image should be visible on MyVideoNav.
Reply
#3
(2018-01-15, 09:27)rmrector Wrote: The 40% success rate could be caching failures: if the image is remote (a URL to fanart.tv or other web service) and Kodi doesn't already have it cached, it will try to download and cache the image, which may fail because of network congestion or other issues (images put a heavy load on free services, and during high usage some requests can be lost). Kodi leaves the image blank on that window, but will try to download and cache it again on the next window that wants to show it, though it doesn't update the window underneath. If you go to the home window (or maybe just to the parent list) and then back the image should be visible on MyVideoNav.

I use locally stored images alongside the media files and scrape with the local-only scaper. I can get that it just doesn't get them all, but it's almost like the DialogVideoInfo window is using a different image cache.

Is there a way to force a re-scrape of images, or missing images?
  
Thanks for the reply by the way.
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#4
Nope, not caching failures then. The only other thing I can think of for that is that the image variable used in DialogVideoInfo has another fallback image that the main list doesn't. Is it possible that Kodi scanned an item to its library before the poster file was added? Kodi won't update existing items with new artwork unless refreshed, which may explain why it worked after manually setting it.

If the images are missing from your Kodi database altogether, you can refresh the items in the database: if playcount, lastplayed, and other running data is synced to your NFO files, you could change the content of your movie source to "None", say 'No' to removing the items, then change the content back to "movies" and then say 'Yes' to refreshing all items. If you don't want to completely refresh the items you can use Artwork Beef to make sure all local artwork is attached; after installing, head to the first page of the add-on settings and enable "Automatically add from file system only" to match your setup, then run it from Program add-ons and select "add missing artwork for ..." "new videos".

If the images are in the Kodi database, or you ran Artwork Beef and it didn't report many updates, then it could mean trouble with your texture cache. With your media library artwork local, it's probably easiest to just delete the existing thumbnail cache altogether, or the Texture Cache Maintenance Utility has a mode that should fix the most likely cache problem ("Xd" I think).
Reply
#5
(2018-01-16, 07:07)rmrector Wrote: The only other thing I can think of for that is that the image variable used in DialogVideoInfo has another fallback image that the main list doesn't. Is it possible that Kodi scanned an item to its library before the poster file was added?

That's why I asked, I kid you not, both windows are using the same variable, and all the image and media files were there already when scraped:
  
https://github.com/MacGyverr/skin.metrop...t.xml#L518

https://github.com/MacGyverr/skin.metrop...o.xml#L649

https://github.com/MacGyverr/skin.metrop...s.xml#L462

I'll try starting over with the image cache again, but I still think it is some weird database+cache issue.

Thanks again for your help, I am really interested in trying the Texture Cache Maintenance Utility you mentioned first.

Wish me luck.
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply

Logout Mark Read Team Forum Stats Members Help
Question about ListItem.Art(poster)0