jurialmunkey / plugin.video.themoviedb.helper

GNU General Public License v3.0
200 stars 95 forks source link

Selection dialog + mising poster [BUG] #526

Closed henryjfry closed 3 years ago

henryjfry commented 3 years ago

This appears to be a slight bug with how the listitem is created for the selection dialog where "details" = TRUE and the item does not have a "listitem.poster" element. If it is an episode or a season the listitem doesnt have a listitem.poster element but could possibly have a "season.poster" and/or "tvshow.poster".

However currently this doesnt seem to get picked up and the selection dialog is populated with the fallbacks.

Therefore would it be possible to populate the "listitem.poster" element from one of the other poster items for a show/season/episode where it is in your DB?

Possibly the listitem elements for the players need to pickup the tvshow poster when created if this is available?

Or is this a kodi side thing, and the selection dialog is just populated from the originating listitem? (ie for an episode no "poster" element is passed through by Kodi?)

drinfernoo commented 3 years ago

The selection dialog shows the icon for the add-on the player corresponds to, doesn't it? 🤔

jurialmunkey commented 3 years ago

The selection dialog shows the icon for the add-on the player corresponds to, doesn't it? 🤔

Yeah im confused by this too - player selection shows icon of plugin not poster of episode.

@henryjfry - by "details" = TRUE are you talking about a player with a "dialog": "true" step (eg like the youtube play episode player)? That dialog uses whatever is set as Listitem.Icon by the plugin being called - TMDbH doesnt lookup details about the items, the metadata is whatever is supplied by the end plugin.

henryjfry commented 3 years ago

By "Details = True" I mean here:

xbmcgui.Dialog().select(ADDON.getLocalizedString(32042), players, useDetails=detailed)

In "select_player" in:

~/.kodi/addons/plugin.video.themoviedb.helper/resources/lib/player/players.py

So where it uses the detailed select dialog which shows the plugin icon on the left had side in the list and a big space for a poster on the right hand side, in addition to the usual list of actions for the file (so the player json results). Rather than when "useDetails=False" and it has the old school selection dialog, which is just a list of the player jsons, with whatever colours are setup in the player file for the plugin name (so not icons at all).

With "useDetails=True" from the "Recently Watched" screen in tmdbhelper or the "Titles" screen from the TV section in the library it will show the tvshow.poster in the select dialog box (as the main litstitem.poster element I suspect), but from a widget containing a list of episodes it will just show in the select dialog poster section a large version of the addon icon, no tv show poster anyway.

I wasnt sure if the item for the select dialog was being created in tmdbhelper as a list item and the selection dialog was connected to that, or if its connected to the originally selected item (so tvshow with a "next episode" link to tmdbhelper or an individual episode strm file)?

If thats the case then I think its just that an episode doesnt have a poster element, just tvshow.poster which the select dialog doesnt know to pickup. But I was thinking if the actual listitems created for the select dialog from the player json's could be populated with the poster needed if available, otherwise fallbacks if not?

If the main list item is created by tmdbhelper then it would just need to override poster where it is empty and use tvshow.poster when it is populated?

On my system I have setup a selection monitor to do some stuff (like get the next episode after the last episode watched) so i've just modified that to populate a poster variable and have modified my select dialog to display that when populated.

But prior to making that change I was trying to figure out exactly where it was coming from and I was struggling to understand exactly the difference between selecting a show and selecting an episode. From the tmdbhelper side they appear to be identical, at least as far as I can determine.

The selection dialog shows the icon for the add-on the player corresponds to, doesn't it? 🤔

Yeah im confused by this too - player selection shows icon of plugin not poster of episode.

@henryjfry - by "details" = TRUE are you talking about a player with a "dialog": "true" step (eg like the youtube play episode player)? That dialog uses whatever is set as Listitem.Icon by the plugin being called - TMDbH doesnt lookup details about the items, the metadata is whatever is supplied by the end plugin.

henryjfry commented 3 years ago

So ive attached two screen shots, the one with the poster is from TMDBHelper recently watched screen and the one without is from an episode widget.

I removed my skin modification to show you the difference when loaded through tmdbhelper or a tvshows screen versus from a single episode.

By the way these are tmdbhelper selection dialogs, ive modified the select screen to show the show label and episode number rather than "Choose action for", so I know if I'm on the correct episode or not.

Possibly a good future improvement for tmdbhelper, additionally if you make modifications to pass the poster through to the selection dialog listitems it might be good to have the episode/movie details available, eg plot instead of "plugin.video.seren v2.0.19-matrix+1"? (although if that would show up in the list too and not just the right side that wouldnt be desirable).

IMG_20210707_113309 IMG_20210707_113336

jurialmunkey commented 3 years ago

Ah I see what you mean. That image control is not a default control of DialogSelect and so TMDbHelper has no control over what it displays. That's a custom image control and thus skin specific. The skin you're using probably has <texture>$INFO[ListItem.Art(poster)]</texture> or some $VAR[] in that image control.

For reference, here's what that same dialog looks like in Estuary (i.e. the default controls of DialogSelect) Honeyview_screenshot00044

Possibly a good future improvement for tmdbhelper, additionally if you make modifications to pass the poster through to the selection dialog listitems it might be good to have the episode/movie details available, eg plot instead of "plugin.video.seren v2.0.19-matrix+1"? (although if that would show up in the list too and not just the right side that wouldnt be desirable).

As above, that right side text is not a default control of DialogSelect. That's something skin specific and TMDbHelper has no control over it. If you want it to show the plot, then you'd need to edit your skin so that particular label control id DialogSelect points to <label>$INFO[ListItem.Plot]</label>

By the way these are tmdbhelper selection dialogs, ive modified the select screen to show the show label and episode number rather than "Choose action for", so I know if I'm on the correct episode or not.

I think that's a really good idea! I'll probably implement that.

henryjfry commented 3 years ago

You might be right, but the section in the skin for dialog select:

<control type="multiimage"> <posx>1089</posx> <posy>325</posy> <width>400</width> <height>300</height> <aspectratio>keep</aspectratio> <timeperimage>5000</timeperimage> <fadetime>150</fadetime> <randomize>true</randomize> <imagepath>$VAR[VideoInfoPosterImage]</imagepath> <visible>!String.Contains(Container(6).ListItem.FileNameAndPath,spinner)</visible> </control>

And the VideoInfoPosterImage variable:

<variable name="VideoInfoPosterImage"> <value condition="!String.IsEmpty(ListItem.Art(poster))">$INFO[ListItem.Art(poster)]</value> <value condition="!String.IsEmpty(ListItem.Art(tvshow.poster))">$INFO[ListItem.Art(tvshow.poster)]</value> <value condition="!String.IsEmpty(ListItem.Art(season.poster))">$INFO[ListItem.Art(season.poster)]</value> <value condition="[Container.Content(episodes) | String.IsEqual(ListItem.DBTYPE,episode) | String.IsEqual(ListItem.Property(DBTYPE),episode)] + !String.IsEmpty(ListItem.Art(season.poster))">$INFO[ListItem.Art(season.poster)]</value> <value condition="Container.Content(episodes) + !String.IsEmpty(ListItem.Art(season.poster))">$INFO[ListItem.Art(season.poster)]</value> <value condition="!String.IsEmpty(ListItem.Art(tvshow.poster))">$INFO[ListItem.Art(tvshow.poster)]</value> <value condition="!String.IsEmpty(ListItem.Property(TVShowThumb))">$INFO[ListItem.Property(TVShowThumb)]</value> <value condition="Skin.HasSetting(SkinHelper.EnableAnimatedPosters) + !String.IsEmpty(Window(Home).Property(SkinHelper.ListItem.Art.AnimatedPoster))">$INFO[Window(Home).Property(SkinHelper.ListItem.Art.AnimatedPoster)]</value> <value>$INFO[ListItem.Icon]</value> </variable>

Only contains standard listitem references, no skin helper services are providing the information (except for the animatedposter one, which isnt enabled for my skin). However value condition 2,3 and 4 are all true and should return tvshow.poster or season.poster for an episode. However if I remove the "$INFO[ListItem.Icon]" and reload the skin no images are returned at all.

Which makes me think it can only display the listitem.poster for some reason. Thats why I thought populating the select dialog list items with the poster might be a solution, without my selection monitor populating a home window property which then needs a skin modification to reference.

jurialmunkey commented 3 years ago

ListItem.Icon, ListItem.Art(poster) and ListItem.Art(tvshow.poster) all work fine for me. ListItem.Art(season.poster) won't work but that's because TMDbHelper doesn't fill it.

Image code (I'm using tvshow.poster and icon here but plain poster will also work just the same).

<control type="grouplist">
    <bottom>0</bottom>
    <orientation>vertical</orientation>
    <align>bottom</align>
    <itemgap>40</itemgap>
    <control type="image">
        <height>480</height>
        <texture>$INFO[ListItem.Art(tvshow.poster)]</texture>
        <aspectratio align="center" aligny="bottom">keep</aspectratio>
    </control>
    <control type="image">
        <height>180</height>
        <texture>$INFO[ListItem.Icon]</texture>
        <aspectratio align="center" aligny="bottom">keep</aspectratio>
    </control>
</control>

Screenshot: Honeyview_screenshot00047

henryjfry commented 3 years ago

Is that in DialogSelect? I've made my modification to dialog select too, pointing at my custom skin variable. However based on how the includes were setup before my modifications it should have been populating the listitem poster anyway. Possibly the skin picks up the selection dialog listitems which overrides the original list item in the variable "VideoInfoPosterImage"?

Wheras the selection dialog knows not to look there? Anyway sounds like its more of a skin issue, so ill probably just stick with my custom modification.