Permalink
Browse files

confluence: initial support for skin variables

  • Loading branch information...
1 parent c81cadf commit b618a7245cc08495323c26a2fb8673128caeb684 @pieh committed Sep 3, 2011
Showing with 26 additions and 82 deletions.
  1. +26 −82 addons/skin.confluence/720p/IncludesCodecFlagging.xml
@@ -1,4 +1,23 @@
<includes>
+ <variable name="typehackflagging">
+ <value condition="[substring(ListItem.FilenameAndPath,bluray) | substring(ListItem.FilenameAndPath,bdrip)]">bluray</value>
+ <value condition="substring(ListItem.FilenameAndPath,hddvd)">hddvd</value>
+ <value condition="substring(ListItem.FilenameAndPath,dvd)">dvd</value>
+ <value condition="[substring(ListItem.FilenameAndPath,pdtv) | substring(ListItem.FilenameAndPath,hdtv) | substring(ListItem.FilenameAndPath,dsr)]">TV</value>
+ <value condition="substring(ListItem.FilenameAndPath,vhs)">vhs</value>
+ </variable>
+ <variable name="rating">
+ <value condition="substring(listitem.mpaa,Rated G)">mpaa_general</value>
+ <value condition="substring(listitem.mpaa,Rated PG) + !substring(listitem.mpaa,Rated PG-13)">mpaa_pg</value>
+ <value condition="substring(listitem.mpaa,Rated PG-13)">mpaa_pg13</value>
+ <value condition="substring(Listitem.mpaa,Rated R)">mpaa_restricted</value>
+ <value condition="substring(Listitem.mpaa,Rated NC)">mpaa_nc17</value>
+ </variable>
+ <variable name="videocodec">
+ <value condition="[substring(ListItem.VideoCodec,div,left) | stringcompare(ListItem.VideoCodec,dx50)]">divx</value>
+ <value>$INFO[ListItem.VideoCodec]</value>
+ </variable>
+
<include name="VideoCodecFlaggingConditions">
<control type="image">
<description>Video rez Image</description>
@@ -8,105 +27,30 @@
<texture>$INFO[ListItem.VideoResolution,flagging/video/,.png]</texture>
</control>
<control type="image">
- <description>Common Codec Image</description>
+ <description>Codec Image</description>
<width>80</width>
<height>35</height>
<aspectratio align="left">keep</aspectratio>
- <texture>$INFO[ListItem.VideoCodec,flagging/video/,.png]</texture>
- <!-- Don't show if its one of the 500 divx codecs -->
- <visible>![substring(ListItem.VideoCodec,div,left) | stringcompare(ListItem.VideoCodec,dx50)]</visible>
- </control>
- <control type="image">
- <description>Divx Codec Image</description>
- <width>80</width>
- <height>35</height>
- <aspectratio align="left">keep</aspectratio>
- <texture>flagging/video/divx.png</texture>
- <visible>[substring(ListItem.VideoCodec,div,left) | stringcompare(ListItem.VideoCodec,dx50)]</visible>
+ <texture>$VAR[videocodec,flagging/video/,.png]</texture>
</control>
</include>
<include name="VideoTypeHackFlaggingConditions">
<control type="image">
- <description>Bluray Image</description>
- <width>80</width>
- <height>35</height>
- <aspectratio align="left">keep</aspectratio>
- <texture>flagging/video/bluray.png</texture>
- <visible>[substring(ListItem.FilenameAndPath,bluray) | substring(ListItem.FilenameAndPath,bdrip)] + !Skin.HasSetting(HideFilenameFlagging)</visible>
- </control>
- <control type="image">
- <description>HDDVD Image</description>
+ <description>Video Type Image</description>
<width>80</width>
<height>35</height>
<aspectratio align="left">keep</aspectratio>
- <texture>flagging/video/hddvd.png</texture>
- <visible>substring(ListItem.FilenameAndPath,hddvd) + !Skin.HasSetting(HideFilenameFlagging)</visible>
- </control>
- <control type="image">
- <description>DVD Image</description>
- <width>80</width>
- <height>35</height>
- <aspectratio align="left">keep</aspectratio>
- <texture>flagging/video/dvd.png</texture>
- <visible>[substring(ListItem.FilenameAndPath,dvd) + ![substring(ListItem.FilenameAndPath,hddvd) | substring(ListItem.FilenameAndPath,bluray) | substring(ListItem.FilenameAndPath,bdrip)]] + !Skin.HasSetting(HideFilenameFlagging)</visible>
- </control>
- <control type="image">
- <description>TV Types Image</description>
- <width>80</width>
- <height>35</height>
- <aspectratio align="left">keep</aspectratio>
- <texture>flagging/video/TV.png</texture>
- <visible>[substring(ListItem.FilenameAndPath,pdtv) | substring(ListItem.FilenameAndPath,hdtv) | substring(ListItem.FilenameAndPath,dsr)] + !Skin.HasSetting(HideFilenameFlagging)</visible>
- </control>
- <control type="image">
- <description>VHS Image</description>
- <width>80</width>
- <height>35</height>
- <aspectratio align="left">keep</aspectratio>
- <texture>flagging/video/vhs.png</texture>
- <visible>substring(ListItem.FilenameAndPath,vhs) + !Skin.HasSetting(HideFilenameFlagging)</visible>
+ <texture>$VAR[typehackflagging,flagging/video/,.png]</texture>
+ <visible>!Skin.HasSetting(HideFilenameFlagging)</visible>
</control>
</include>
<include name="VideoMPAAFlaggingConditions">
<control type="image">
- <description>Rated G</description>
- <width>80</width>
- <height>35</height>
- <aspectratio>keep</aspectratio>
- <texture>flagging/ratings/mpaa_general.png</texture>
- <visible>substring(listitem.mpaa,Rated G)</visible>
- </control>
- <control type="image">
- <description>Rated PG</description>
- <width>80</width>
- <height>35</height>
- <aspectratio>keep</aspectratio>
- <texture>flagging/ratings/mpaa_pg.png</texture>
- <visible>substring(listitem.mpaa,Rated PG) + !substring(listitem.mpaa,Rated PG-13)</visible>
- </control>
- <control type="image">
- <description>Rated PG-13</description>
- <width>80</width>
- <height>35</height>
- <aspectratio>keep</aspectratio>
- <texture>flagging/ratings/mpaa_pg13.png</texture>
- <visible>substring(listitem.mpaa,Rated PG-13)</visible>
- </control>
- <control type="image">
- <description>Rated R</description>
- <width>80</width>
- <height>35</height>
- <aspectratio>keep</aspectratio>
- <texture>flagging/ratings/mpaa_restricted.png</texture>
- <visible>substring(Listitem.mpaa,Rated R)</visible>
- </control>
- <control type="image">
- <description>Rated NC-17</description>
+ <description>Rating image</description>
<width>80</width>
<height>35</height>
<aspectratio>keep</aspectratio>
- <texture>flagging/ratings/mpaa_nc17.png</texture>
- <visible>substring(Listitem.mpaa,Rated NC)</visible>
+ <texture>$VAR[rating,flagging/ratings/,.png]</texture>
</control>
</include>
<include name="AudioCodecFlaggingConditions">

0 comments on commit b618a72

Please sign in to comment.