How can we fix the image size problem with addons?
#31
(2015-05-18, 18:00)bromix Wrote:
(2015-05-18, 17:50)Hitcher Wrote: Just set the content based on the aspect ratio of the images used rather than the actual content type.

So if your addon supplies movies but they use landscape style images set the content to episodes.

Hope that makes sense.

Not quite...Movies should show different informations then episodes for TV shows. Compared on the behavior of Confluence...the information are quite different for movies and episodes. The skin behaves different - the navigation in the information dialog is different.

I would put all images I can get via the setArt method....for example: for YouTube I get three different types of images, the fanart (landscape), a banner and a thumb (square). But to return to your guide line...I would see to it to provide for the videos (episodes) landscape images. For everything else (even the channels) I don't set a content and provide only the square thumbs (Like your example).

Video (episodes) = Landscape
Navigation and Channels (None) = Square
I agree with what Hitcher and Bromix are proposing here.
I'm a little confused about the relationship between setArt and setContent.
Just to be clear, setArt is on a listitem, setContent is on a container, correct?
setContent both selects the images and metadata fields for a given content view?
Is the thumb definition square as per Bromix above, or 16:9? I seem to see one or the other depending on which skin I look at (or at least not all are square).

(2015-05-18, 18:01)Hitcher Wrote: Sorry, didn't realise addons could also set the art type.

EDIT: Just a shame we don't have ListItem.Art(square) and I think everything would be covered.

Can we achieve ListItem.Art(square) by using ListItem.setIconImage?
Reply
#32
(2015-05-18, 22:54)learningit Wrote:
(2015-05-18, 18:00)bromix Wrote:
(2015-05-18, 17:50)Hitcher Wrote: Just set the content based on the aspect ratio of the images used rather than the actual content type.

So if your addon supplies movies but they use landscape style images set the content to episodes.

Hope that makes sense.

Not quite...Movies should show different informations then episodes for TV shows. Compared on the behavior of Confluence...the information are quite different for movies and episodes. The skin behaves different - the navigation in the information dialog is different.

I would put all images I can get via the setArt method....for example: for YouTube I get three different types of images, the fanart (landscape), a banner and a thumb (square). But to return to your guide line...I would see to it to provide for the videos (episodes) landscape images. For everything else (even the channels) I don't set a content and provide only the square thumbs (Like your example).

Video (episodes) = Landscape
Navigation and Channels (None) = Square
I agree with what Hitcher and Bromix are proposing here.
I'm a little confused about the relationship between setArt and setContent.
Just to be clear, setArt is on a listitem, setContent is on a container, correct?
setContent both selects the images and metadata fields for a given content view?
Is the thumb definition square as per Bromix above, or 16:9? I seem to see one or the other depending on which skin I look at (or at least not all are square).

(2015-05-18, 18:01)Hitcher Wrote: Sorry, didn't realise addons could also set the art type.

EDIT: Just a shame we don't have ListItem.Art(square) and I think everything would be covered.

Can we achieve ListItem.Art(square) by using ListItem.setIconImage?
I give this some thought tomorrow - I think we already have everything we need. Got just out of Mad Max and I'm totally flashed Cool so not able to think straight....so much action!!! Smile
Reply
#33
Scratch what I said earlier and follow what Phil suggested.

setContent for the container and setArt for the ListItem.Art(type) depending on the aspect of the provided image.

Off topic: Great film.
Reply
#34
(2015-05-18, 23:52)Hitcher Wrote: Scratch what I said earlier and follow what Phil suggested.

setContent for the container and setArt for the ListItem.Art(type) depending on the aspect of the provided image.

Off topic: Great film.
that wont solve the problem though because you wont be able to have conditional visibility of views based upon artwork available (because the list needs to be visible to test what art a list item has). We need something to indicate what the default art is (listitem.thumb) before the list is visible.

The only complete solution is having something like Container.Aspect(poster)

If thats not a possibility then a compromise has to be made - should content type be set based upon artwork or information available? For me artwork is more important because at least the viee looks right and half the addons set the wrong content type already anyway. Also are there really movie addons that dont have posters at all?
Reply
#35
Somehow the post above by jurialmunkey finally reminded me why I really never made much use of content type "episodes" and almost always use "tvshows" and/or "movies".
It's to do with the search function in several of my earlier addons and more recently my PBS and CBC addons. When doing a search, you never know what's going to come back. Many times I get back just a video and an image with little or no metadata to support content type decision other than the description alluding to whether it's an episode of a show or a movie. I know it's a playable video but have no reliable way of knowing if it's a movie or an episode, however the image has different aspect ratios depending on what's returned. I wasn't sure how to figure out what the aspect ratio of the image was from the image file (naming wasn't happening) so I just looked at them and decided that they looked better as posters and therefore choose either "movies or "tvshows" for the whole search container depending on what metadata was available.
I now know that this will screw up some skins. The saddest part of this story is that a couple of the addons need to use the search facility with a category or name set as the standard method to get content.
There are things like documentaries which have poster images but the meta-data reads like an episode of a show.
I only bring all this up because the more I think about cases, at least for my addons, it would be nice to be able to change the content type on ListItem level, rather than Container level. I don't know if that's a real pain in the rear elsewhere or not.
Reply
#36
(2015-05-19, 00:35)jurialmunkey Wrote: ....
that wont solve the problem though because you wont be able to have conditional visibility of views based upon artwork available (because the list needs to be visible to test what art a list item has). We need something to indicate what the default art is (listitem.thumb) before the list is visible.
I would just provide guide lines.

(2015-05-19, 00:35)jurialmunkey Wrote: The only complete solution is having something like Container.Aspect(poster)

Who would set this value/property? I can't follow on this.

(2015-05-19, 00:35)jurialmunkey Wrote: If thats not a possibility then a compromise has to be made - should content type be set based upon artwork or information available? For me artwork is more important because at least the viee looks right and half the addons set the wrong content type already anyway. Also are there really movie addons that dont have posters at all?
I my opinion it makes no sense....content type describes the content and not the kind of image we have..that's not really nice Wink Also I'm one the the other half who wants the information instead of to much graphical overjoy Smile

(2015-05-19, 05:46)learningit Wrote: Somehow the post above by jurialmunkey finally reminded me why I really never made much use of content type "episodes" and almost always use "tvshows" and/or "movies".
It's to do with the search function in several of my earlier addons and more recently my PBS and CBC addons. When doing a search, you never know what's going to come back. Many times I get back just a video and an image with little or no metadata to support content type decision other than the description alluding to whether it's an episode of a show or a movie. I know it's a playable video but have no reliable way of knowing if it's a movie or an episode, however the image has different aspect ratios depending on what's returned. I wasn't sure how to figure out what the aspect ratio of the image was from the image file (naming wasn't happening) so I just looked at them and decided that they looked better as posters and therefore choose either "movies or "tvshows" for the whole search container depending on what metadata was available.
I now know that this will screw up some skins. The saddest part of this story is that a couple of the addons need to use the search facility with a category or name set as the standard method to get content.
There are things like documentaries which have poster images but the meta-data reads like an episode of a show.
I only bring all this up because the more I think about cases, at least for my addons, it would be nice to be able to change the content type on ListItem level, rather than Container level. I don't know if that's a real pain in the rear elsewhere or not.

I don't see a problem here....if this is the case...we shouldn't do addons at all. I know the problems and pain with search and mixed content returned by it...but that's not the problem...just don't set a content type (not everything is based on search or mixed content at once).

For the rest of an addon it should be clear which content type work and which not - I wouldn't set for SoundCloud episodes...I even set Artist for the Artist selection and it works. Please take a look at my addons, I even switch while navigating the content type so the skin works properly with the information of the addon and have no complaining about it at all.

Take for example Reb Bull TV: I set no conent for most (default) navigation...for Shows I set TV Show...it also provides Films (but I missed to switch to Movies Big Grin ) and for all videos I switch to Episodes....it works very well and I don't see a problem...only solutions and possibilities to deal with it. There is only a missing rule set/guide lines - we shouldn't complicate things.

I do this all day at work reminding co-workers of functions, methods and tools that are already there and only must be used properly. Please don't get me wrong, but if I look at some source code of addons here and there I just start to cry Smile and no wonder the content type isn't set correct...the addon isn't working properly.

The only guideline for the addon is mostly what are the sizes for local images (256x256 for thumbs for example).
Reply
#37
Based on your insides and ideas...I would just update the addon section for developers with the following.
  • shows the container (starting with the first item Big Grin ) Movies -> set content type to 'movies', provide poster images (portraits) and try to provide as much information as possible.
  • shows the container (starting with the first item Big Grin ) TV Shows -> set content type to 'tvshows', provide poster images (portraits)
  • shows the container (starting with the first item Big Grin ) Episodes (of a TV Show) -> set content type to 'episodes', provide landscape images and try to provide as much information as possible.
  • ....
  • for all the rest that doesn't fit...set no content type at all! and provide thumbs (square). - which will mostly be the navigation in the root of an addon (for example)

At this point I would suggest my only wish for the future...an additonal content type...videoclip because most of our addons provide clips and not episodes of tv shows...just an idea Smile

I need a coffee Tongue
Reply
#38
(2015-05-19, 07:21)bromix Wrote: At this point I would suggest my only wish for the future...an additonal content type...videoclip because most of our addons provide clips and not episodes of tv shows...just an idea Smile

I need a coffee Tongue

'musicvideo' Smile
As that is intended for that purpose. musicvideos are not concerts.
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
#39
(2015-05-19, 07:28)Martijn Wrote:
(2015-05-19, 07:21)bromix Wrote: At this point I would suggest my only wish for the future...an additonal content type...videoclip because most of our addons provide clips and not episodes of tv shows...just an idea Smile

I need a coffee Tongue

'musicvideo' Smile
As that is intended for that purpose. musicvideos are not concerts.

Okay....in YouTube for example I should set 'musicvideo' instead of 'episode' ? I'm understanding you right? (thought this was a special content type for music videos ^^)....I test with YouTube....mom...
Reply
#40
mhmm...content type = 'musicvideo' I'm only missing the plot/description of the video and maybe the published date could be complete Smile
Image
Reply
#41
Not saying there's a flaw in Confluence skin but imo musicvideo should be used for.......musicvideos. Might mean some tweaking in skin(s).
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
#42
Back to content type 'episodes' - the only cosmetic "problem" I have...is the episode information reminding me that this is for a sub group (sub set) for tv shows - but that's something I can live with.

Image
Reply
#43
It's quite late where I am now and I've spent several hours playing with different combinations of content types/metadata and found out lots of things that I didn't notice previously.
Just because you set a content to a specific type doesn't mean that the skin will honor that type under all situations. For example (I've been using Transparency and Confluence to look at this) if I set a container to "files" the file listing correctly displays a square icon. However if I press "I" for information, the information panel displays the same icon as a poster image if I have set the info field for TVShowTitle to allow the correct meta data for a TV show to display.
In a similar fashion, if I set a content type of "tvshows" without setting TVShowTitle in the info field and use Title instead, the metadata fields displayed when pressing "I" are for a movie and a poster is displayed. If I set "episodes" as a content type and don't set an episode number, I get the metadata fields for a movie and the thumb becomes a poster as well.
If I set no content type and just set the minimum info fields as above, I get the correct metadata view, but the image varies from skin to skin.
I don't know if this is consistent for other skins, I sort of doubt it. I haven't seen this content / info field dependency documented anywhere.
I'm beginning to believe that the addon needs to supply a thumb, poster and icon with correct size/aspect in order to get all combinations to work.
Reply
#44
(2015-05-19, 07:14)bromix Wrote: I don't see a problem here....if this is the case...we shouldn't do addons at all. I know the problems and pain with search and mixed content returned by it...but that's not the problem...just don't set a content type (not everything is based on search or mixed content at once).

For the rest of an addon it should be clear which content type work and which not - I wouldn't set for SoundCloud episodes...I even set Artist for the Artist selection and it works. Please take a look at my addons, I even switch while navigating the content type so the skin works properly with the information of the addon and have no complaining about it at all.

Take for example Reb Bull TV: I set no conent for most (default) navigation...for Shows I set TV Show...it also provides Films (but I missed to switch to Movies Big Grin ) and for all videos I switch to Episodes....it works very well and I don't see a problem...only solutions and possibilities to deal with it. There is only a missing rule set/guide lines - we shouldn't complicate things.

I do this all day at work reminding co-workers of functions, methods and tools that are already there and only must be used properly. Please don't get me wrong, but if I look at some source code of addons here and there I just start to cry Smile and no wonder the content type isn't set correct...the addon isn't working properly.

The only guideline for the addon is mostly what are the sizes for local images (256x256 for thumbs for example).
Yeah after thinking about this some more I made a stupid suggestion on this. As in my post above, I'm realizing that I also need to manage the minimum info fields correctly even if I don't have meta data to get the correct image to display, regardless of whether I set a content type or not. This is something that I wasn't aware of - I thought the content view of "tvshows" forced the correct info fields to be displayed in an information panel. That is clearly not the case.
Reply
#45
(2015-05-19, 07:21)bromix Wrote: Based on your insides and ideas...I would just update the addon section for developers with the following.
  • shows the container (starting with the first item Big Grin ) Movies -> set content type to 'movies', provide poster images (portraits) and try to provide as much information as possible.
  • shows the container (starting with the first item Big Grin ) TV Shows -> set content type to 'tvshows', provide poster images (portraits)
  • shows the container (starting with the first item Big Grin ) Episodes (of a TV Show) -> set content type to 'episodes', provide landscape images and try to provide as much information as possible.
  • ....
  • for all the rest that doesn't fit...set no content type at all! and provide thumbs (square). - which will mostly be the navigation in the root of an addon (for example)

I know what I'm going to write here is going to piss some folks off: while I believe the above is correct, it is only half the story.
After further testing with Confluence, the behaviour that I see is that setContent really only sets the View Types available to View Options for a particular content type.
I'm not sure if that is by function or what I'm seeing is "fallback" logic because I'm using the icon and thumb fields in the listitem init rather than ListItem.Art(), a skinner or someone more familiar with the Container functions would know better than I. The behaviour may differ using ListItem.Art().
I am not using the ListItem.Art() function, but rather setting the icon or thumb or both in the init of the listitem.
What I see is that the actual view that I get is driven more by which info fields I provide in the first item of the container list.
Setting no content type gives me the following:
1) Setting the info field "Title" gives me what I would say is the "movies" content type and meta fields display.
2) Setting the info field "TVShowTitle" without setting "Episode" gives me what I would say is "tvshows" content type and meta fields display.
3) Setting the info fields "TVShowTitle" and setting the "Episode" info field gives me what I would say is "episodes" content type and meta fields display.

I get the same results setting the content type to an appropriate value ("movies", "tvshows", etc), but I get a richer list of View Types available to View Options. For example: if I set content type to "episodes" I get List, Big List, Thumbnail, Media Info, Media info 2 and Media info 3. Setting no content type gives me List, Big List, Thumbnail, Media Info. For each view, I get the same visual result regardless of whether I set thumb, icon or both. Some of the views (like Media info 3) appear to use thumb or icon depending which info field I set or don't set.

Pressing "I" on a list item, in most views, forces the icon or thumb into a poster size in the info panel view.

If I set the icon value in the listitem init to a poster image, most views display it as a poster, but a couple views look like they do try to display it as a square icon (or resize to something that looks square rather than poster).

Based on the above I tend to believe that the info fields provided drive the view (combined image and meta-fields) more than the type of image or content type provided. at least in the case of Confluence and Transparency skins.

I haven't attempted to look at the code in a skin or Kodi to see what it's doing. As an addon dev, I'm just testing different parameters to try to identify a path to understanding how to fix the original problem stated in the thread. This is a team issue and probably can't be answered in full by any single resource.

I think Bromix is absolutely right in not wanting to resize images and solving the problem by avoiding views that are inappropriate for the images available from the addon. Based upon what I'm seeing there may be some additional conditions around info fields which need to be defined or confirmed.

If it would be helpful, I'm more than happy to throw a very, very simple "hacked" addon into my git to demonstrate what I am saying above.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



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