Kodi Community Forum

Full Version: Find out art style?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think it's a little annoying that all types of art in the selection window (FileBrowser.xml iirc) share the same outer dimensions. So I can't create specific dialogs for setting banners and thumbs respectively. This leads to unnecessary and unwanted white space in most designs.

The first solution I've come up with is to check the image url, which at least allows you to distinguish between fanart and all other types. However this still does not allow to account for the difference between, say, movie posters (tall and narrow) and banners (wide and small).

Another idea was to deduce the art style from the image's size or aspect ratio, but I believe these fields aren't even available in this case.

My best bet right now is to add an onclick event to all list items in DialogSelect.xml, which would then copy the item's label to a skin string. I haven't tried this yet and it might not even work. But if it does, this should allow to set up FileBrowser.xml based on that string. The catch is that all list items and all buttons in that window would have to reset the string as to prevent weird behavior in other areas.

Does anyone have a (better) solution to this?
What you want would need something like a "Control.GetAspect(IMAGE_CONTROL_ID)" infolabel. Since there are not that many use cases for such an info label I doubt that any coder will tackle that.
In general I like the idea about more "dynamic" dialogs when they are frequently used though. I put up a PR for dialogselect some days ago to also get rid of unwanted whitespace. ( https://github.com/xbmc/xbmc/pull/5550 )
I have asked about this long time a go regarding Player.Art(foo) where posters are stretched or scaled if the content is not properly set by the addons. In many addons the content is not matching the available artwork (Movies or TVShows content with landscape/wide art) resolving to bad looking artworks. ATM most of the skins are using "keep" aspect ratio and there is an empty space depending on if the artwork is landscape/wide or poster.

We need some how to get the aspect ratio of the textures so we can display them properly otherwise IMO is better not to display them at all in cases that we cannot control how they look. Something that i am thinking to do with my next skin update.


Cheers
Nessus
In most cases developer or plugin author knows what type of images is being used, thus:

Container.ImageType(squares, banners, posters....) should do.

Although, all skinning system needs some re-thinking to make it more efficient e.g.:

Container.Content(plugins)
Container.ContentType(directories, plugin_content, mixed_items...)

Last thing I would suggest is moving plugins to it's own window - MyAddonNav.xml This way we don't mix apples with oranges (or Movies with video_plugin_clips, for example)