How can we fix the image size problem with addons?
#1
We design views for specific content conforming to specific ratios (eg movies = portrait, episodes = landscape, albums = square) which works perfectly for content in libraries as the images scraped follow the same rules. But then an addon will define it's content one type while the images it supplies will be another types.

Content = movies / images = square

Image

Content = not movies, TV shows, episodes / images = portrait

Image

What are the options here?

Automatically detect image sizes?
Make addons define the image type?

Thoughts?
Reply
#2
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).
Reply
#3
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.
Reply
#4
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
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
#5
In your skin , you always use :
<aspectratio align="center">scale</aspectratio>

Try to use "keep",see the diference in picture .....
<aspectratio align="center">keep</aspectratio>

Image
XBoxMediaCenter (Kodi Matrix ) 19.3 , AndroidBox -Matrix Skin AeonMQ6
Reply
#6
Wont work for fTV as that uses a fixed height for all view types unless we had auto width for lists.
Reply
#7
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.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#8
(2015-05-17, 13:09)Hitcher Wrote: Wont work for fTV as that uses a fixed height for all view types unless we had auto width for lists.

Auto layout width/height (depending on orientation) would be the ideal solution and would also open up a ton of other possibilities too.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#9
(2015-05-17, 13:39)jurialmunkey Wrote: 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.

I would like to mention that perhaps many, many plugin devs don't even know they can. Most just do c/p from others and work from that. If the first one didn't set content it's more than likely they won't either. You would only find out if you c/p from a well done plugin, reading the docs or get pointed out to the fact you can do this.

So the more they get pointed to the fact they can the more will do it correct.

Edit:
spammed the addon mailinglist about this so lets hope it raises some awareness
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
#10
@Martijn it's not just that they don't set content it's that the content they're getting might supply the artwork in a different content types ratio. So if their content is movies but the images supplied are landscape they'd actually need to set the content as episode.
Reply
#11
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.
Reply
#12
Maybe Container.Artwork(parameter) could be an option?
Reply
#13
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.
Reply
#14
from what i can recall is that you set it for the entire plugin. If you put this in the beginning of your plugin the xbmcplugin.setContent() will always be called prior to entering any level of the plugin.
Should you have a variety content you need to set for that level (don't shoot me if i'm wrong here Smile )
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
#15
Check out the iplayer addon as that changes the content type depending on where you are.

Image

Image
Reply

Logout Mark Read Team Forum Stats Members Help
How can we fix the image size problem with addons?0