Trakt Custom Actions
#1
Hi,

Long time Metropolis user, it is the best xbmc skin by a country mile. Big Grin

I am trying to work out how to modify the skins context menu to include the Trakt Custom Actions (https://github.com/trakt/script.trakt/wiki) but I am very new to modifying skins and I don't seem to be getting very far. Huh

From reading in the forums it looks as though the best way to implement these actions to the skin is to include them in the context menu through DialogContextMenu.xml. ezechiel1917 has provided an example for the Transparency skin but it doesn't seem to work when used within the metropolis DialogContextMenu.xml file and I don't know enough about the structure and format of the xml file to work out how to modify it to work within metropolis.

Code:
<control type="button" id="1247">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Rate on trakt.tv</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=rate)</onclick>
                <visible>!IsEmpty(ListItem.TVShowTitle) + !IsEmpty(ListItem.DBID) + !StringCompare(ListItem.Label,All seasons) + !SubString(ListItem.Label,Season ,,left) + !StringCompare(ListItem.Label,Specials) | [SubString(Container.FolderPath,videodb://Movies/) | SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | SubString(Container.FolderPath,videodb://RecentlyAddedMovies) | SubString(Container.FolderPath,special://profile/playlists/video/Movies)]</visible>
            </control>            
            <control type="button" id="1248">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Add to trakt.tv Watchlist</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=addtolist,list=Watchlist)</onclick>
                <visible>!IsEmpty(ListItem.DBID) + !IsEmpty(ListItem.Duration) + [SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | [!IsEmpty(ListItem.DBID) + SubString(Container.FolderPath,videodb://movies/ + !SubString(Container.FolderPath,videodb://movies/tags/)] | SubString(Container.FolderPath,videodb://RecentlyAddedMovies)] | [SubString(Container.FolderPath,special://profile/playlists/video/Movies) + !SubString(Container.FolderPath,special://profile/playlists/video/Movies Watchlist)]]</visible>                
            </control>
            <control type="button" id="1249">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Remove from trakt.tv Watchlist</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=removefromlist,list=Watchlist)</onclick>
                <visible>!IsEmpty(ListItem.DBID) + !IsEmpty(ListItem.Duration) + [SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | SubString(Container.FolderPath,videodb://movies/) | SubString(Container.FolderPath,videodb://RecentlyAddedMovies)] | SubString(Container.FolderPath,special://profile/playlists/video/Movies)]</visible>                
            </control>            
            <control type="button" id="1251">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Add/Remove trakt.tv lists</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=itemlists)</onclick>
                <visible>!IsEmpty(ListItem.TVShowTitle) + !IsEmpty(ListItem.DBID) + !StringCompare(ListItem.Label,All seasons) + !SubString(ListItem.Label,Season ,,left) + !StringCompare(ListItem.Label,Specials) | [SubString(Container.FolderPath,videodb://Movies/) | SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | SubString(Container.FolderPath,videodb://RecentlyAddedMovies) | SubString(Container.FolderPath,special://profile/playlists/video/Movies)]</visible>
            </control>
            <control type="button" id="1252">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Manage trakt.tv lists</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=managelists)</onclick>
            </control>        
            <control type="button" id="1253">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Update trakt.tv tags</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=updatetags)</onclick>
            </control>

If someone could point me in the right direction then it would be really appreciated.

Thanks heaps.
Reply
#2
Holy conditional visibility Batman! Let me guess, only two show up?

I can barely follow them and I'm the one who wrote this:
Code:
<visible>!ControlGroup(9001).HasFocus() + ![Control.HasFocus(8000) | Control.HasFocus(8001) | Control.HasFocus(8002) | Control.HasFocus(8003) | Control.HasFocus(8004)] + [[Container(9000).HasFocus(1) + !Skin.HasSetting(NoProgramsSubs)] | [Container(9000).HasFocus(2) + [!Skin.HasSetting(NoVideoSubs) | Skin.HasSetting(HomeVideos_Shortcuts)]] | [Container(9000).HasFocus(3) + [!Skin.HasSetting(NoMusicSubs) | Skin.HasSetting(HomeMusic_Shortcuts)]] | [Container(9000).HasFocus(18) + Skin.HasSetting(HomeCustom1_Shortcuts)] | [Container(9000).HasFocus(19) + Skin.HasSetting(HomeCustom2_Shortcuts)] | [Container(9000).HasFocus(20) + Skin.HasSetting(HomeCustom3_Shortcuts)] | [Container(9000).HasFocus(21) + Skin.HasSetting(HomeCustom4_Shortcuts)] | [Container(9000).HasFocus(4) + [!Skin.HasSetting(NoMoviesSubs) | Skin.HasSetting(HomeMovies_Shortcuts)]] | [Container(9000).HasFocus(5) + [!Skin.HasSetting(NoTVShowsSubs) | Skin.HasSetting(HomeTVShows_Shortcuts)]] | [Container(9000).HasFocus(6) + [[Skin.HasSetting(HomePictures_Override) | Skin.HasSetting(HomePictures_Shortcuts)] | !Skin.HasSetting(NoPicturesSubs)]] | [[Container(9000).HasFocus(7) + ![Skin.HasSetting(HomeForecast) | Skin.HasSetting(NoWeatherSubs)] ]]  | [Container(9000).HasFocus(8) + ![Skin.HasSetting(NoSettingsSubs) | Skin.HasSetting(NoSettings)]] | Container(9000).HasFocus(9) | [Container(9000).HasFocus(10) + Skin.HasSetting(HomeFavourites_Shortcuts) + !Skin.HasSetting(NoFavouritesSubs)] | [Container(9000).HasFocus(11) + !Skin.HasSetting(NoShutdownSubs)] | [Container(9000).HasFocus(15) + !Skin.HasSetting(NoLiveTVSubs)] | [Container(9000).HasFocus(16) + !Skin.HasSetting(NoMusicVideosSubs)] | [Container(9000).HasFocus(17) + Skin.HasSetting(HomeGames_Shortcuts) + !Skin.HasSetting(NoGamesSubs)]]</visible>

But in all seriousness, I don't have/use Trakt so I can't test it in real life. Tell me what it does or doesn't do and I'll try to help?
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#3
Hi MacGyver,
Firstly, thank you very much for helping me out with, it is much appreciated. Big Grin

Unfortunately when I tried the code, the screenshot below is what I got from my context menu.
This was similar to what I was getting before I used your 'visible' edit.

Image

The code I entered is below.

Code:
<control type="button" id="1247">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Rate on trakt.tv</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=rate)</onclick>
                <visible>!ControlGroup(9001).HasFocus() + ![Control.HasFocus(8000) | Control.HasFocus(8001)

| Control.HasFocus(8002) | Control.HasFocus(8003) | Control.HasFocus(8004)] + [[Container(9000).HasFocus(1)

+ !Skin.HasSetting(NoProgramsSubs)] | [Container(9000).HasFocus(2) + [!Skin.HasSetting(NoVideoSubs) |

Skin.HasSetting(HomeVideos_Shortcuts)]] | [Container(9000).HasFocus(3) + [!Skin.HasSetting(NoMusicSubs) |

Skin.HasSetting(HomeMusic_Shortcuts)]] | [Container(9000).HasFocus(18) + Skin.HasSetting

(HomeCustom1_Shortcuts)] | [Container(9000).HasFocus(19) + Skin.HasSetting(HomeCustom2_Shortcuts)] |

[Container(9000).HasFocus(20) + Skin.HasSetting(HomeCustom3_Shortcuts)] | [Container(9000).HasFocus(21) +

Skin.HasSetting(HomeCustom4_Shortcuts)] | [Container(9000).HasFocus(4) + [!Skin.HasSetting(NoMoviesSubs) |

Skin.HasSetting(HomeMovies_Shortcuts)]] | [Container(9000).HasFocus(5) + [!Skin.HasSetting(NoTVShowsSubs) |

Skin.HasSetting(HomeTVShows_Shortcuts)]] | [Container(9000).HasFocus(6) + [[Skin.HasSetting

(HomePictures_Override) | Skin.HasSetting(HomePictures_Shortcuts)] | !Skin.HasSetting(NoPicturesSubs)]] |

[[Container(9000).HasFocus(7) + ![Skin.HasSetting(HomeForecast) | Skin.HasSetting(NoWeatherSubs)] ]]  |

[Container(9000).HasFocus(8) + ![Skin.HasSetting(NoSettingsSubs) | Skin.HasSetting(NoSettings)]] |

Container(9000).HasFocus(9) | [Container(9000).HasFocus(10) + Skin.HasSetting(HomeFavourites_Shortcuts) +

!Skin.HasSetting(NoFavouritesSubs)] | [Container(9000).HasFocus(11) + !Skin.HasSetting(NoShutdownSubs)] |

[Container(9000).HasFocus(15) + !Skin.HasSetting(NoLiveTVSubs)] | [Container(9000).HasFocus(16) + !

Skin.HasSetting(NoMusicVideosSubs)] | [Container(9000).HasFocus(17) + Skin.HasSetting(HomeGames_Shortcuts)

+ !Skin.HasSetting(NoGamesSubs)]]</visible>
            </control>            
            <control type="button" id="1248">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Add to trakt.tv Watchlist</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=addtolist,list=Watchlist)</onclick>
                <visible>!ControlGroup(9001).HasFocus() + ![Control.HasFocus(8000) | Control.HasFocus(8001)

| Control.HasFocus(8002) | Control.HasFocus(8003) | Control.HasFocus(8004)] + [[Container(9000).HasFocus(1)

+ !Skin.HasSetting(NoProgramsSubs)] | [Container(9000).HasFocus(2) + [!Skin.HasSetting(NoVideoSubs) |

Skin.HasSetting(HomeVideos_Shortcuts)]] | [Container(9000).HasFocus(3) + [!Skin.HasSetting(NoMusicSubs) |

Skin.HasSetting(HomeMusic_Shortcuts)]] | [Container(9000).HasFocus(18) + Skin.HasSetting

(HomeCustom1_Shortcuts)] | [Container(9000).HasFocus(19) + Skin.HasSetting(HomeCustom2_Shortcuts)] |

[Container(9000).HasFocus(20) + Skin.HasSetting(HomeCustom3_Shortcuts)] | [Container(9000).HasFocus(21) +

Skin.HasSetting(HomeCustom4_Shortcuts)] | [Container(9000).HasFocus(4) + [!Skin.HasSetting(NoMoviesSubs) |

Skin.HasSetting(HomeMovies_Shortcuts)]] | [Container(9000).HasFocus(5) + [!Skin.HasSetting(NoTVShowsSubs) |

Skin.HasSetting(HomeTVShows_Shortcuts)]] | [Container(9000).HasFocus(6) + [[Skin.HasSetting

(HomePictures_Override) | Skin.HasSetting(HomePictures_Shortcuts)] | !Skin.HasSetting(NoPicturesSubs)]] |

[[Container(9000).HasFocus(7) + ![Skin.HasSetting(HomeForecast) | Skin.HasSetting(NoWeatherSubs)] ]]  |

[Container(9000).HasFocus(8) + ![Skin.HasSetting(NoSettingsSubs) | Skin.HasSetting(NoSettings)]] |

Container(9000).HasFocus(9) | [Container(9000).HasFocus(10) + Skin.HasSetting(HomeFavourites_Shortcuts) +

!Skin.HasSetting(NoFavouritesSubs)] | [Container(9000).HasFocus(11) + !Skin.HasSetting(NoShutdownSubs)] |

[Container(9000).HasFocus(15) + !Skin.HasSetting(NoLiveTVSubs)] | [Container(9000).HasFocus(16) + !

Skin.HasSetting(NoMusicVideosSubs)] | [Container(9000).HasFocus(17) + Skin.HasSetting(HomeGames_Shortcuts)

+ !Skin.HasSetting(NoGamesSubs)]]</visible>              
            </control>
            <control type="button" id="1249">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Remove from trakt.tv Watchlist</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=removefromlist,list=Watchlist)</onclick>
                <visible>!IsEmpty(ListItem.DBID) + !IsEmpty(ListItem.Duration) + [SubString

(Container.FolderPath,library://Video/Movies/Titles.xml) | SubString

(Container.FolderPath,videodb://movies/) | SubString(Container.FolderPath,videodb://RecentlyAddedMovies)] |

SubString(Container.FolderPath,special://profile/playlists/video/Movies)]</visible>                
            </control>            
            <control type="button" id="1251">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Add/Remove trakt.tv lists</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=itemlists)</onclick>
                <visible>!ControlGroup(9001).HasFocus() + ![Control.HasFocus(8000) | Control.HasFocus(8001)

| Control.HasFocus(8002) | Control.HasFocus(8003) | Control.HasFocus(8004)] + [[Container(9000).HasFocus(1)

+ !Skin.HasSetting(NoProgramsSubs)] | [Container(9000).HasFocus(2) + [!Skin.HasSetting(NoVideoSubs) |

Skin.HasSetting(HomeVideos_Shortcuts)]] | [Container(9000).HasFocus(3) + [!Skin.HasSetting(NoMusicSubs) |

Skin.HasSetting(HomeMusic_Shortcuts)]] | [Container(9000).HasFocus(18) + Skin.HasSetting

(HomeCustom1_Shortcuts)] | [Container(9000).HasFocus(19) + Skin.HasSetting(HomeCustom2_Shortcuts)] |

[Container(9000).HasFocus(20) + Skin.HasSetting(HomeCustom3_Shortcuts)] | [Container(9000).HasFocus(21) +

Skin.HasSetting(HomeCustom4_Shortcuts)] | [Container(9000).HasFocus(4) + [!Skin.HasSetting(NoMoviesSubs) |

Skin.HasSetting(HomeMovies_Shortcuts)]] | [Container(9000).HasFocus(5) + [!Skin.HasSetting(NoTVShowsSubs) |

Skin.HasSetting(HomeTVShows_Shortcuts)]] | [Container(9000).HasFocus(6) + [[Skin.HasSetting

(HomePictures_Override) | Skin.HasSetting(HomePictures_Shortcuts)] | !Skin.HasSetting(NoPicturesSubs)]] |

[[Container(9000).HasFocus(7) + ![Skin.HasSetting(HomeForecast) | Skin.HasSetting(NoWeatherSubs)] ]]  |

[Container(9000).HasFocus(8) + ![Skin.HasSetting(NoSettingsSubs) | Skin.HasSetting(NoSettings)]] |

Container(9000).HasFocus(9) | [Container(9000).HasFocus(10) + Skin.HasSetting(HomeFavourites_Shortcuts) +

!Skin.HasSetting(NoFavouritesSubs)] | [Container(9000).HasFocus(11) + !Skin.HasSetting(NoShutdownSubs)] |

[Container(9000).HasFocus(15) + !Skin.HasSetting(NoLiveTVSubs)] | [Container(9000).HasFocus(16) + !

Skin.HasSetting(NoMusicVideosSubs)] | [Container(9000).HasFocus(17) + Skin.HasSetting(HomeGames_Shortcuts)

+ !Skin.HasSetting(NoGamesSubs)]]</visible>
            </control>
            <control type="button" id="1252">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Manage trakt.tv lists</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=managelists)</onclick>
            </control>        
            <control type="button" id="1253">
                <posx>0</posx>
                <posy>0</posy>
                <width>300</width>
                <height>35</height>
                <label>Update trakt.tv tags</label>
                <font>font-20</font>
                <align>center</align>
                <textcolor>white</textcolor>
                <focusedcolor>lightblue</focusedcolor>
                <texturefocus border="7">list-focus.png</texturefocus>
                <texturenofocus border="7">list-nofocus.png</texturenofocus>
                <onclick>RunScript(script.trakt,action=updatetags)</onclick>
            </control>

Thanks again for your help.
Reply
#4
Sorry, that wasn't meant to solve your issue, but to show how confusing Conditionals could be. In the end the issue wasn't even there, it was where you were placing your buttons. (as you can see by the code)

You can just replace the entire contents of the file with this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="106">
    <defaultcontrol>1000</defaultcontrol>
    <animation type="WindowOpen" reversible="false">
        <effect type="zoom" start="80" end="100" center="auto" easing="out" tween="back" time="300" />
        <effect type="fade" start="0" end="100" time="300" />
    </animation>
    <animation type="WindowClose" reversible="false">
        <effect type="zoom" start="100" end="80" center="auto" easing="in" tween="back" time="300" />
        <effect type="fade" start="100" end="0" time="300" />
    </animation>
    <coordinates>
        <system>1</system>
        <posx>0</posx>
        <posy>0</posy>
        <origin x="440" y="120" />
    </coordinates>
    <controls>
        <control type="image" id="999">
            <description>background image</description>
            <posx>0</posx>
            <posy>0</posy>
            <width>400</width>
            <height>730</height>
            <texture>frames/Dialog_Glass2PanelMedium.png</texture>
            <colordiffuse>DialogBackgroundColor</colordiffuse>
        </control>
        <control type="grouplist" id="996">
            <description>grouplist for context buttons</description>
            <left>20</left>
            <top>30</top>
            <width>360</width>
            <height max="670">auto</height>
            <itemgap>2</itemgap>
            
            <control type="button" id="1247">
                <posx>0</posx>
                <posy>0</posy>
                <width>360</width>
                <height>35</height>
                <label>Rate on trakt.tv</label>
                <font>METF_DialogLarge</font>
                <align>center</align>
                <aligny>center</aligny>
                <textcolor>TextNF</textcolor>
                <focusedcolor>DialogTextFO</focusedcolor>
                <texturefocus border="1">ButtonFO2Wide.png</texturefocus>
                <onclick>RunScript(script.trakt,action=rate)</onclick>
                <visible>!IsEmpty(ListItem.TVShowTitle) + !IsEmpty(ListItem.DBID) + !StringCompare(ListItem.Label,All seasons) + !SubString(ListItem.Label,Season ,,left) + !StringCompare(ListItem.Label,Specials) | [SubString(Container.FolderPath,videodb://Movies/) | SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | SubString(Container.FolderPath,videodb://RecentlyAddedMovies) | SubString(Container.FolderPath,special://profile/playlists/video/Movies)]</visible>
            </control>            
            <control type="button" id="1248">
                <posx>0</posx>
                <posy>0</posy>
                <width>360</width>
                <height>35</height>
                <label>Add to trakt.tv Watchlist</label>
                <font>METF_DialogLarge</font>
                <align>center</align>
                <aligny>center</aligny>
                <textcolor>TextNF</textcolor>
                <focusedcolor>DialogTextFO</focusedcolor>
                <texturefocus border="1">ButtonFO2Wide.png</texturefocus>
                <onclick>RunScript(script.trakt,action=addtolist,list=Watchlist)</onclick>
                <visible>!IsEmpty(ListItem.DBID) + !IsEmpty(ListItem.Duration) + [SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | [!IsEmpty(ListItem.DBID) + SubString(Container.FolderPath,videodb://movies/ + !SubString(Container.FolderPath,videodb://movies/tags/)] | SubString(Container.FolderPath,videodb://RecentlyAddedMovies)] | [SubString(Container.FolderPath,special://profile/playlists/video/Movies) + !SubString(Container.FolderPath,special://profile/playlists/video/Movies Watchlist)]]</visible>                
            </control>
            <control type="button" id="1249">
                <posx>0</posx>
                <posy>0</posy>
                <width>360</width>
                <height>35</height>
                <label>Remove from trakt.tv Watchlist</label>
                <font>METF_DialogLarge</font>
                <align>center</align>
                <aligny>center</aligny>
                <textcolor>TextNF</textcolor>
                <focusedcolor>DialogTextFO</focusedcolor>
                <texturefocus border="1">ButtonFO2Wide.png</texturefocus>
                <onclick>RunScript(script.trakt,action=removefromlist,list=Watchlist)</onclick>
                <visible>!IsEmpty(ListItem.DBID) + !IsEmpty(ListItem.Duration) + [SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | SubString(Container.FolderPath,videodb://movies/) | SubString(Container.FolderPath,videodb://RecentlyAddedMovies)] | SubString(Container.FolderPath,special://profile/playlists/video/Movies)]</visible>                
            </control>            
            <control type="button" id="1251">
                <posx>0</posx>
                <posy>0</posy>
                <width>360</width>
                <height>35</height>
                <label>Add/Remove trakt.tv lists</label>
                <font>METF_DialogLarge</font>
                <align>center</align>
                <aligny>center</aligny>
                <textcolor>TextNF</textcolor>
                <focusedcolor>DialogTextFO</focusedcolor>
                <texturefocus border="1">ButtonFO2Wide.png</texturefocus>
                <onclick>RunScript(script.trakt,action=itemlists)</onclick>
                <visible>!IsEmpty(ListItem.TVShowTitle) + !IsEmpty(ListItem.DBID) + !StringCompare(ListItem.Label,All seasons) + !SubString(ListItem.Label,Season ,,left) + !StringCompare(ListItem.Label,Specials) | [SubString(Container.FolderPath,videodb://Movies/) | SubString(Container.FolderPath,library://Video/Movies/Titles.xml) | SubString(Container.FolderPath,videodb://RecentlyAddedMovies) | SubString(Container.FolderPath,special://profile/playlists/video/Movies)]</visible>
            </control>
            <control type="button" id="1252">
                <posx>0</posx>
                <posy>0</posy>
                <width>360</width>
                <height>35</height>
                <label>Manage trakt.tv lists</label>
                <font>METF_DialogLarge</font>
                <align>center</align>
                <aligny>center</aligny>
                <textcolor>TextNF</textcolor>
                <focusedcolor>DialogTextFO</focusedcolor>
                <texturefocus border="1">ButtonFO2Wide.png</texturefocus>
                <onclick>RunScript(script.trakt,action=managelists)</onclick>
            </control>        
            <control type="button" id="1253">
                <posx>0</posx>
                <posy>0</posy>
                <width>360</width>
                <height>35</height>
                <label>Update trakt.tv tags</label>
                <font>METF_DialogLarge</font>
                <align>center</align>
                <aligny>center</aligny>
                <textcolor>TextNF</textcolor>
                <focusedcolor>DialogTextFO</focusedcolor>
                <texturefocus border="1">ButtonFO2Wide.png</texturefocus>
                <onclick>RunScript(script.trakt,action=updatetags)</onclick>
            </control>            
            
        </control>
        <control type="button" id="1000">
            <description>button template</description>
            <onleft>Dialog.Close(contextmenu)</onleft>
            <onright>Dialog.Close(contextmenu)</onright>
            <posx>40</posx>
            <posy>40</posy>
            <width>360</width>
            <height>35</height>
            <font>METF_DialogLarge</font>
            <align>center</align>
            <aligny>center</aligny>
            <textcolor>TextNF</textcolor>
            <focusedcolor>DialogTextFO</focusedcolor>
            <texturefocus border="1">ButtonFO2Wide.png</texturefocus>
        </control>
        <include condition="Skin.HasSetting(DebugMode)">Debug</include>
    </controls>
</window>

And it will look like this:
Image

Cheers. Smile
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply
#5
Awesome! Thanks MacGyver, that worked perfectly! Appreciate your assistance.
Reply
#6
No problem. Smile
Using a NUC7PJYHN and a 2820FYKH0 Intel NUC running LibreELEC, and two FireTVs.:)
Reply

Logout Mark Read Team Forum Stats Members Help
Trakt Custom Actions0