Get orientation/aspectratio of ListItem.Icon/Thumb image?
#1
Does anyone know of a way to get the aspectratio or orientation of a image supplied by an $INFO tag? I'm finding video add-ons to be inconsistent and a bit of a pain to skin for. Wanted to change how a view displays based upon the image orientation (keep is not suitable for what I want to do). All I need is some way to know whether height is greater than width or equal to.

I'm pretty sure this isn't possible, but maybe I'm missing something obvious?
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#2
No, there isn't a real nice way to do so, else you'll need to specify the content for every single addon and that's not really the intention. I think addon creators should handle their addons the same way the xbmc database does. If the addon shows movies or tvshows the aspect ratio (poster appears) , if it's an episode a thumb etc.
Reply
#3
(2014-04-08, 11:29)butchabay Wrote: I think addon creators should handle their addons the same way the xbmc database does. If the addon shows movies or tvshows the aspect ratio (poster appears) , if it's an episode a thumb etc.

Some do, although quite a few also use this incorrectly. There's add-ons that set their content type to movies for example, but the thumbnails are not posters. An add-on like "The Trailers" is a perfect example of how it's done right. The add-on provides thumbnails (and meta-data) that actually conforms to the content type. All the viewtypes I made available for movies work just as well with this add-on as they do with library content.

To be honest I have given up on trying to regulate this at skin level. It's a major pita. At one point I was even coding conditions for specific add-ons... Now, I tailor my viewtypes and labels for the various content types (and a fallback for content that does not have a content type set). Then if it looks weird it's up to the add-on author to use it correctly imo.

If the website / video service the add-on is pulling content from doesn't provide thumbnails and meta data that justify using one of the content types, the add-on should just not use any content type.

All imo.
Reply
#4
I was suggesting a while ago to have content type based on thumbs used or something similar. There are lot of addons setting up container.content(movies) as they can use more skin views that way. Of course, most of the addons do not provide posters. Some even used to provide bannersSmile I've also suggested merging of various plots, descriptions, etc into one so that you could check if plot is availabe and accomodete skin view accordingly.

And let me not forget my most hated ".." Patent folder item which "brakes" navigation and ListItem.IsFolder check.
My skins:

Amber
Quartz

Reply
#5
(2014-04-08, 14:04)pecinko Wrote: And let me not forget my most hated ".." Patent folder item which "brakes" navigation and ListItem.IsFolder check.

I found putting in a StringCompare(ListItem.Icon,DefaultFolderBack.png) works well as an alternative for this.
Reply
#6
(2014-04-08, 11:29)butchabay Wrote: No, there isn't a real nice way to do so, else you'll need to specify the content for every single addon and that's not really the intention. I think addon creators should handle their addons the same way the xbmc database does. If the addon shows movies or tvshows the aspect ratio (poster appears) , if it's an episode a thumb etc.
I didn't think there was a way - just a far fetched hope that maybe I'd overlooked something. I really wish they set content type properly like you say. In particular, even the ones with posters that do set the content correctly still fail to do so in the base directory where they often use square thumbs (xbmctorrent I'm looking at you!) - those should be set to Container.Content(addons).

(2014-04-08, 13:01)Jeroen Wrote: To be honest I have given up on trying to regulate this at skin level. It's a major pita. At one point I was even coding conditions for specific add-ons... Now, I tailor my viewtypes and labels for the various content types (and a fallback for content that does not have a content type set). Then if it looks weird it's up to the add-on author to use it correctly imo.

If the website / video service the add-on is pulling content from doesn't provide thumbnails and meta data that justify using one of the content types, the add-on should just not use any content type.
Definitely a major pita! I think I'm going to have to go this route too and just blame any problems on the addons :p
I might make one special case for youtube because I personally use it a lot, but that's it really.

(2014-04-08, 14:04)pecinko Wrote: I've also suggested merging of various plots, descriptions, etc into one so that you could check if plot is availabe and accomodete skin view accordingly.

And let me not forget my most hated ".." Patent folder item which "brakes" navigation and ListItem.IsFolder check.
That would be amazing if plots were merged (like artist description etc.) - would make things much easier.
Yep I hate the ".." too! I always forget about testing it because I usually have it turned off, and then I realise it totally breaks something.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply

Logout Mark Read Team Forum Stats Members Help
Get orientation/aspectratio of ListItem.Icon/Thumb image?0