Issues with plugin behavior/infolabels/sort methods
#1
I'm only looking for discussion on this, i.e. is what I'm describing actually bugs that I should submit to trac or is this just stuff that is deemed not worth bothering with. I have looked through the forum and trac and couldn't find any references to these issues. This is some behavior I have noticed while working on my plugin.

TV Shows

In confluence, when viewing tvshows (not seasons or episodes, the shows themselves) label2 in the listings shows episodes counts (i.e. "40 episodes"). However, when displaying a plugin with a contentType of "tvshows", label2 is blank - regardless of sort method. Is this a bug? Shouldn't it display label2 the same way if the sortmethod is set the same (i.e. Label)? I have tried setting label2mask as a work-around, but it seems that if the content type is set to "tvshows" then label2mask is ignored (it shows up as blank no matter what the sort method or label2mask is set to - its just always blank).

Ive tried to figure out how the "x episodes" business gets set, but so far I have not been able to find it... Is it in the skin or in code?

Seasons

If you set the contenttype to "seasons", and do NOT set the infolabel "tvshowtitle", the info dialog will display the season thumb correctly (to the left of the dialog, properly sized). However, if you DO set the infolabel for tvshowtitle, it is displayed as if xbmc thinks it is a tvshow banner (on the top, stretched horizontally). The problem with this is if you do not set tvshowtitle, the breadcrumb nav at the top of the screen does not sow the tvshow name as it should. its kind of a catch-22... This same problem actually seems to plague the native library as well, it has the same issue with the info dialog on seasons.

I realize this is probably just due to inconsistencies that have developed over time as new features were added - I suspect that the thshowtitle infolabel is used as a flag somewhere to determine which method of display for the thumbnail should be used. Would a patch that determined the info dialog layout for this based on the dimensions of the thumbnail be considered if it were made (i.e. if the width/height > 5)? That would make it more bullet proof I think. I'm willing to attempt the patch, but some pointers on where to start looking would be greatly appreciated.

Thoughts?
Reply
#2
Upon digging more... The issue with seasons appears to be the that skin uses container.content to determine which dialog layout to use. But somewhere in the code, setting the "tvshowtitle" infolabel seems to change the value of container.content from "seasons" (as set by the plugin contenttype) to "tvshows". Or at least that is what it seems like - maybe Im just not grokking this correctly...
Reply
#3
See GUIWindowVideoInfo.cpp - technically there is no "Season Info" view - thus you're really viewing detail of the tvshow itself, except (for reasons that basically come down to a lack of time to refactor the dialog) that we use the season-specific thumb.

At a guess, it's setting content based on some heuristic in the fileitem, some of which you're not quite setting correctly.

As for total episodes, that is done by the labelmask most likely (though it may actually be in the skin - not 100% sure) which isn't done for anything other than a particular sort method I believe - see PluginDirectory.cpp, and compare with GUIViewStateVideo.cpp. We really need to document what is applied when (and why) and see whether we can unify these a bit.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
jmarshall Wrote:See GUIWindowVideoInfo.cpp - technically there is no "Season Info" view - thus you're really viewing detail of the tvshow itself, except (for reasons that basically come down to a lack of time to refactor the dialog) that we use the season-specific thumb.

I see. Ok, I did a fix for confluence that I think deals with this properly... In DialogVideoInfo.xml I change the block at line 330 from this:

Code:
                    <control type="image">
  <posx>177</posx>
  <posy>10</posy>
  <width>675</width>
  <height>124</height>
  <aspectratio>stretch</aspectratio>
  <bordertexture border="5">button-nofocus.png</bordertexture>
  <bordersize>4</bordersize>
  <texture background="true">$INFO[ListItem.Icon]</texture>
</control>

to this:

Code:
<control type="image">
  <posx>177</posx>
  <posy>10</posy>
  <width>675</width>
  <height>124</height>
  <aspectratio>stretch</aspectratio>
  <bordertexture border="5">button-nofocus.png</bordertexture>
  <bordersize>4</bordersize>
  <texture background="true">$INFO[Container.Property(TVShowThumb)]</texture>
  <visible>!isEmpty(Container.Property(TVShowThumb))</visible>
</control>
<control type="image">
  <posx>177</posx>
  <posy>10</posy>
  <width>675</width>
  <height>124</height>
  <aspectratio>stretch</aspectratio>
  <bordertexture border="5">button-nofocus.png</bordertexture>
  <bordersize>4</bordersize>
  <texture background="true">$INFO[ListItem.Icon]</texture>
  <visible>isEmpty(Container.Property(TVShowThumb))</visible>
</control>

And repeated the same type of correction on line 475 for the TVShowsUsePoster block. That make sense? It seems to work fine as far as I can tell and logically it seems it would do the right thing in all scenarios (falling back to the current behavior if there is no container.tvshowthumb. It works in my plugin correctly as well.

Only thing is (assuming this is good)... How do you submit a patch for a skin? I never did that before? Do I do a diff?
Reply

Logout Mark Read Team Forum Stats Members Help
Issues with plugin behavior/infolabels/sort methods0