Posts: 4,060
Joined: Mar 2010
Reputation:
94
I think it's to the addon creator. If content is set to movies then it should show posters. The problem is some addons have parent folders and most of them are using square or icons. Best would be to fetch the image aspect ratio (if possible).
Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
2015-05-17, 12:14
(This post was last modified: 2015-05-17, 12:15 by Jeroen.)
Add-on developers should simply not define the content type as movies or tv shows when it really doesn't provide any of those content types. I gave up long ago trying to solve this at skin level.
imo add-ons should define the content type as movies or tvshows when they supply poster sized images. In any other situation they should not define any content type. Or maybe episodes, as that can generally be seen as thumbnail / screen cap size images. Only then can you reliably set up a fallback logic.
Posts: 17,859
Joined: Jul 2011
Reputation:
371
or let them define several art types?
So they would define thumb/poster/banner on all levels when available. Not sure if this is actually available for plugins
Posts: 17,417
Joined: Aug 2007
Reputation:
590
Hitcher
Team-Kodi Member
Posts: 17,417
Wont work for fTV as that uses a fixed height for all view types unless we had auto width for lists.
Posts: 7,806
Joined: Feb 2013
Reputation:
1,486
I take the same position as Jeroen. If the content type is Movies/TvShows then I assume it has Poster+Fanart. If its content is episodes I assume it has a 16:9 thumb. Anything else I assume Square.
Add-ons need to set the correct content type for each level. In the two examples above both are clearly the wrong content type and the problem would be rectified if they just set the right content type (first should be set as files and second should be set as movies). If the add-on authors can't even set the correct content type then I really don't think they can be expected to set additional properties correctly either.
Posts: 2,571
Joined: Aug 2012
Reputation:
217
I'm probably the biggest offender here. Frankly, I just use 'movies' or 'tvshows' depending on the content I need to display. I use Transparency! as my standard skin and usually test a new one on Confluence. Transparency! does a decent job of displaying an image regardless of the size or aspect ratio given to it. Different skins produce different results.
Generally, one doesn't have a choice as to size or aspect ratio of the image being scraped from a website. Another problem is many well known websites have very little usable metadata without doing a deep grab for individual pages which brings the speed of the addon to its knees, so often the metadata for a particular view is very sparse.
On the basis that some image is better than no image, I usually try to choose one that is closest to poster I can. If it's too high res or elongated in it's aspect ratio, I usually omit the poster image and use the image as fanart.
I've found that some websites change the size and aspect ratio of images from time to time, or if I have to swap to a mobile interface to get the addon to continue working after the main web site changes, all the images will be sized differently.
I don't have an answer to fix this. I'm thinking that maybe the addon could tell the skin what image size and metadata fields it has available and let the skin choose the view that's most appropriate. In reality this already exists because of the info fields and images currently being passed (but the addon is selecting the view), but maybe having the addon providing hints or something like that would lighten the load on the skin.
Posts: 17,417
Joined: Aug 2007
Reputation:
590
Hitcher
Team-Kodi Member
Posts: 17,417
Maybe Container.Artwork(parameter) could be an option?
Posts: 2,571
Joined: Aug 2012
Reputation:
217
I just went through my addons and realized that, on the basis of the above conversation, not a single one is correct (I've got 36 or 37 in the kodi.org repo). I never really noticed the issue because Transparency! handles icons pretty well in poster view. If you look at the first example above, USTV Vod in Transparency! it has a very different look.
I actually thought that "files" was a view which displayed the file extension similar to the file manager, but I've always been a bit dense.
I can cleanup most of my addons, but I have a question about how xbmcplugin.setContent() works. Does it set the view for the entire directory, or just the listitems that follow the call? I have a few directories which are mixed items (like tv episodes in thumbnail and a next page entry with an icon) and I seem to remember having issues with how this worked. Also is there somewhere that the sizes and aspect ratios are documented for each view? I can't seem to find a doc on that.