How do I ignore menu items in TV Shows Seasons?
#1
Question 
Hi Guys,

I’m currently trying to create a new view in my skin to duplicate the TV show section in Netflix. I restrict the view to seasons level of TVShows library and use a list control (one line in height to resemble a button with the current Tv season) to read each listitem. I them use a panel control that uses the listitem.folderpath from the first list control in a content tag in the panel control.

This all works as expected, except the list control also has entries for .. and All Seasons which I don’t want shown. Now I do thing this way as sometimes a TV show will use season1 ... seasonx, or sometimes series1 ... seriesx or even something completely different (chapter, part, etc.).

Is there some way to filter out .. and All Seasons from the listitem’s used by the list control? Failing that, is there an alternative that allows the display of listitem’s from the appropriate season (whatever the seasons may be called) when the season button is toggled?

Wyrm (AppTV)
Reply
#2
the easiest will be to stick with it and respect the related kodi settings
( 'videolibrary.tvshowsincludeallseasonsandspecials' ; ' videolibrary.flattentvshows ' ; filelists.showparentdiritems )
otherwise things can get messy...

here an example how i would do it
first you need to hide the default view container and just
use onfocus actions, because the default content is filled by kodi itself.

NOTE:
- you'll get issues with toggle watched state ( kodi handles it in a way that the current focused item of current view will be toghled w/uw , which is the hidden control in that scenario )

xml:

<control type="list" id="58">
<visible>container.content(seasons)</visible> <!-- maybe sets, albums also fit -->
<viewtype label="$LOCALIZE[1234]"> season</viewtype>

<onfocus>SetFocus(58001)</onfocus>
<left>-3000</left>
<top>-3000</top>
<width>1</width>
<height>1</height>
<itemlayout height="10" width="10" />
<focusedlayout height="10" width="10" />
</control>

<control type="list" id="58001">
<visible>control.isvisible(58) + container.content(seasons)</visible> <!-- maybe sets, albums also fit -->

important , if missed previous view id wont be focused
<onback>SetFocus(50)</onback>

.....your layout for seasons
<content>$VAR[season_content]</content>
</control>



<variable name="season_content">
<value condition="!string.isempty(Container(58).ListItemAbsolute(2).tvshowdbid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(2).tvshowdbid]/</value>
<value condition="!string.isempty(Container(58).ListItemAbsolute(1).tvshowdbid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(1).tvshowdbid]/</value>
<value condition="!string.isempty(Container(58).ListItemAbsolute(0).ListItem.TvShowDBID)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(0).ListItem.TvShowDBID]/</value>
</variable>
<!--
or try circumstance ... listitem.label e.g. and decode the listitem.tvshowtitle with a variable in the onfocus action in native container
{"limit":0,"order":{"direction":"ascending","method":""},"rules":{"and":[{"field":"label","operator":"isnot","value":["$LOCALICE[20366]"]},{"field":"label","operator":"isnot","value":[".."]},{"field":"tvshow","operator":"is","value":["tvshowtitle"]}]},"type":"seasons"}
back String.IsEqual(Container(58).ListItem(0).label,..)
*all seasons String.IsEqual(Container(58).ListItem(0).label,$LOCALIZE[20366])
-->
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#3
(2021-06-29, 07:35)mardukL Wrote: the easiest will be to stick with it and respect the related kodi settings
( 'videolibrary.tvshowsincludeallseasonsandspecials' ; ' videolibrary.flattentvshows ' ; filelists.showparentdiritems )

its not pretty nice but
first you need to hide the default view container and just
use onfocus actions, because the default content is filled by kodi itself.

NOTE:
- you'll get issues with toggle watched state ( kodi handles it in a way that the current focused item of current view will be toghled w/uw , which is the hidden control in that scenario )

xml:

<control type="list" id="58">
<visible>container.content(seasons)</visible> <!-- maybe sets, albums also fit -->
<viewtype label="$LOCALIZE[1234]"> season</viewtype>
<onfocus condition="String.IsEqual(Window(Home).Property(menucontrol_active),common)">ClearProperty(menucontrol_active,home)</onfocus>
<onfocus>SetFocus(58001)</onfocus>
<onfocus>SetFocus(58001)</onfocus>
<left>-3000</left>
<top>-3000</top>
<width>1</width>
<height>1</height>
<itemlayout height="10" width="10" />
<focusedlayout height="10" width="10" />
</control>

<control type="list" id="58">
<visible>container.content(seasons)</visible> <!-- maybe sets, albums also fit -->
<viewtype label="$LOCALIZE[Huh?]"> season Huh</viewtype>
<onfocus condition="String.IsEqual(Window(Home).Property(menucontrol_active),common)">ClearProperty(menucontrol_active,home)</onfocus>
important , if missed previous view id wont be focused
<onback>SetFocus(50)</onback>

.....your layout for seasons
<content>$VAR[season_content]</content>
</control>



<variable name="season_content">
<value condition="!string.isempty(Container(58).ListItemAbsolute(2).tvshowid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(2).tvshowid]/</value>
<value condition="!string.isempty(Container(58).ListItemAbsolute(1).tvshowid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(1).tvshowid]/</value>
<value condition="!string.isempty(Container(58).ListItemAbsolute(0).tvshowid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(0).tvshowid]/</value>
</variable>
<!--
or try circumstance ... listitem.label e.g. and decode the listitem.tvshowtitle with a variable in the onfocus action in native container
{"limit":0,"order":{"direction":"ascending","method":""},"rules":{"and":[{"field":"label","operator":"isnot","value":["$LOCALICE[20366]"]},{"field":"label","operator":"isnot","value":[".."]},{"field":"tvshow","operator":"is","value":["tvshowtitle"]}]},"type":"seasons"}
back String.IsEqual(Container(58).ListItem(0).label,..)
*all seasons String.IsEqual(Container(58).ListItem(0).label,$LOCALIZE[20366])
-->

@mardukL ,

thanks mate, little bit there to digest. Will try some of your suggestions and report back what works.

Wyrm
Reply
#4
(2021-06-29, 08:14)wyrm Wrote:
(2021-06-29, 07:35)mardukL Wrote: the easiest will be to stick with it and respect the related kodi settings
( 'videolibrary.tvshowsincludeallseasonsandspecials' ; ' videolibrary.flattentvshows ' ; filelists.showparentdiritems )

its not pretty nice but
first you need to hide the default view container and just
use onfocus actions, because the default content is filled by kodi itself.

NOTE:
- you'll get issues with toggle watched state ( kodi handles it in a way that the current focused item of current view will be toghled w/uw , which is the hidden control in that scenario )

xml:

<control type="list" id="58">
<visible>container.content(seasons)</visible> <!-- maybe sets, albums also fit -->
<viewtype label="$LOCALIZE[1234]"> season</viewtype>
<onfocus condition="String.IsEqual(Window(Home).Property(menucontrol_active),common)">ClearProperty(menucontrol_active,home)</onfocus>
<onfocus>SetFocus(58001)</onfocus>
<onfocus>SetFocus(58001)</onfocus>
<left>-3000</left>
<top>-3000</top>
<width>1</width>
<height>1</height>
<itemlayout height="10" width="10" />
<focusedlayout height="10" width="10" />
</control>

<control type="list" id="58">
<visible>container.content(seasons)</visible> <!-- maybe sets, albums also fit -->
<viewtype label="$LOCALIZE[Huh?]"> season Huh</viewtype>
<onfocus condition="String.IsEqual(Window(Home).Property(menucontrol_active),common)">ClearProperty(menucontrol_active,home)</onfocus>
important , if missed previous view id wont be focused
<onback>SetFocus(50)</onback>

.....your layout for seasons
<content>$VAR[season_content]</content>
</control>



<variable name="season_content">
<value condition="!string.isempty(Container(58).ListItemAbsolute(2).tvshowid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(2).tvshowid]/</value>
<value condition="!string.isempty(Container(58).ListItemAbsolute(1).tvshowid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(1).tvshowid]/</value>
<value condition="!string.isempty(Container(58).ListItemAbsolute(0).tvshowid)>videodb://tvshows/titles/$INFO[Container(58).ListItemAbsolute(0).tvshowid]/</value>
</variable>
<!--
or try circumstance ... listitem.label e.g. and decode the listitem.tvshowtitle with a variable in the onfocus action in native container
{"limit":0,"order":{"direction":"ascending","method":""},"rules":{"and":[{"field":"label","operator":"isnot","value":["$LOCALICE[20366]"]},{"field":"label","operator":"isnot","value":[".."]},{"field":"tvshow","operator":"is","value":["tvshowtitle"]}]},"type":"seasons"}
back String.IsEqual(Container(58).ListItem(0).label,..)
*all seasons String.IsEqual(Container(58).ListItem(0).label,$LOCALIZE[20366])
-->

@mardukL ,

thanks mate, little bit there to digest. Will try some of your suggestions and report back what works.

Wyrm


np.

got a few typos, but i think you can sort it out.

e.g.
listitem.tvshowid need be
ListItem.TvShowDBID
Skins |  Titan M O D   •   S W A N (WIP)
Reply

Logout Mark Read Team Forum Stats Members Help
How do I ignore menu items in TV Shows Seasons?0