How can we fix the image size problem with addons?
#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


Messages In This Thread
RE: How can we fix the image size problem with addons? - by learningit - 2015-05-20, 03:32
Logout Mark Read Team Forum Stats Members Help
How can we fix the image size problem with addons?0