2013-07-03, 07:56
The best way to implement these actions to the skin is to include them in context menu through DialogContextMenu.xml
Here's sample from my !transparency skin (The visibility conditions might not be perfect for some items...):
Here's sample from my !transparency skin (The visibility conditions might not be perfect for some items...):
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>