2009-06-28, 01:26
Nuka1195 Wrote:here is the final version. native support would be better.
http://xbmc-addons.googlecode.com/svn/pa...lyAdded.py
you can call the script with params. all params are optional
eg
Code:<onfocus>XBMC.RunScript(special://home/scripts/RecentlyAdded.py,limit=3&albums=$INFO[Skin.HasSetting(showalbums)]&partial=$INFO[Skin.HasSetting(showpartialviewed)])</onfocus>
limit = the number of items to set(default=5)
albums = True to display the most recent music albums(default = show most recent songs)
partial = show the videos that have not been finished, but have started
*albums, the path is still set to an individual song as i don't know how to make PlayMedia play an album
**partial, PlayMedia does not support resume, so the video will start from the beginning
skinners you can have settings for these as shown in my example. the setting must be True when selected.
i cant seem to get last albums working, ihave last songs working great but, if i have the albums=true i still just gets songs, this means that if i add 6 albums it still only displays the 6 songs from last album. can you tell me where am going wrong ? here is the code i'm using
Code:
<include name="latest_added">
<control type="button" id="500">
<texturefocus>-</texturefocus>
<texturenofocus>-</texturenofocus>
<onclick>-</onclick>
<label>-</label>
<posy>-100</posy>
<posx>0</posx>
<onfocus>XBMC.RunScript(special://skin/extras/RecentlyAdded.py,limit=6&albums=True])</onfocus>
<onfocus>SetFocus(300)</onfocus>
</control>
<!--Latest Music-->
<control type="list" id="510">
<visible>Container(300).HasFocus(1) + !Skin.HasSetting(noweatherpopup) + Skin.HasSetting(homelatest)</visible>
<posx>50</posx>
<posy>40</posy>
<width>1190</width>
<height>287</height>
<scrolltime>600</scrolltime>
<orientation>horizontal</orientation>
<focusposition>0</focusposition>
<onup>300</onup>
<ondown>300</ondown>
<onleft>510</onleft>
<onright>510</onright>
<animation effect="slide" start="0,-20" end="0,-20" time="0" condition="!Skin.HasSetting(highertime)">Conditional</animation>
<animation effect="zoom" start="100" end="90" time="200" center="640,80" condition="Player.HasAudio + Skin.HasSetting(lowermainmenu)">Conditional</animation>
<animation effect="fade" start="0" end="100" time="500">WindowOpen</animation>
<animation effect="fade" start="100" end="0" time="200">WindowClose</animation>
<animation effect="fade" start="0" end="100" delay="800" time="400">Visible</animation>
<animation effect="fade" start="100" end="0" time="200">Hidden</animation>
<itemlayout width="198" height="287">
<control type="image">
<posy>0</posy>
<width>190</width>
<height>237</height>
<texture>home/home_weather_big.png</texture>
</control>
<control type="label">
<posx>95</posx>
<posy>-7</posy>
<width>170</width>
<height>50</height>
<align>center</align>
<aligny>center</aligny>
<font>Font_LatestAdditionsTiles</font>
<textcolor>c0FFFFFF</textcolor>
<wrapmultiline>true</wrapmultiline>
<scrollspeed>30</scrollspeed>
<label>[UPPERCASE]$INFO[ListItem.label][/UPPERCASE]</label>
</control>
<control type="label">
<posx>95</posx>
<posy>28</posy>
<width>170</width>
<height>20</height>
<align>center</align>
<aligny>center</aligny>
<font>Font_LatestAdditionsYear</font>
<textcolor>c0FFFFFF</textcolor>
<label>[UPPERCASE]$INFO[ListItem.label2][/UPPERCASE]</label>
</control>
<control type="image">
<texture diffuse="multiplex/multiplex_mask.png">$INFO[ListItem.icon]</texture>
<posx>20</posx>
<posy>70</posy>
<width>150</width>
<height>150</height>
</control>
</itemlayout>
<focusedlayout width="198" height="287">
<control type="image">
<posy>0</posy>
<width>190</width>
<height>237</height>
<texture>home/home_weather_big.png</texture>
</control>
<control type="label">
<posx>95</posx>
<posy>-7</posy>
<width>170</width>
<height>50</height>
<align>center</align>
<aligny>center</aligny>
<font>Font_LatestAdditionsTiles</font>
<textcolor>FFFFFFFF</textcolor>
<wrapmultiline>true</wrapmultiline>
<scrollspeed>30</scrollspeed>
<label>[UPPERCASE]$INFO[ListItem.label][/UPPERCASE]</label>
</control>
<control type="label">
<posx>95</posx>
<posy>28</posy>
<width>170</width>
<height>20</height>
<align>center</align>
<aligny>center</aligny>
<font>Font_LatestAdditionsYear</font>
<textcolor>FFFFFFFF</textcolor>
<label>[UPPERCASE]$INFO[ListItem.label2][/UPPERCASE]</label>
</control>
<control type="image">
<texture diffuse="multiplex/multiplex_mask.png">$INFO[ListItem.icon]</texture>
<posx>20</posx>
<posy>70</posy>
<width>150</width>
<height>150</height>
</control>
</focusedlayout>
<content>
<item>
<label>$INFO[Window.Property(LatestSong.1.Album)]</label>
<label2>$INFO[Window.Property(LatestSong.1.Artist)]</label2>
<onclick>$INFO[Window.Property(LatestSong.1.Path),PlayMedia(,)]</onclick>
<Fanart>$INFO[Window.Property(LatestSong.1.Fanart)]</Fanart>
<thumb>$INFO[Window.Property(LatestSong.1.Thumb)]</thumb>
<visible>!IsEmpty(Window.Property(LatestSong.1.Album))</visible>
</item>
<item>
<label>$INFO[Window.Property(LatestSong.2.Album)]</label>
<label2>$INFO[Window.Property(LatestSong.2.Artist)]</label2>
<onclick>$INFO[Window.Property(LatestSong.2.Path),PlayMedia(,)]</onclick>
<Fanart>$INFO[Window.Property(LatestSong.2.Fanart)]</Fanart>
<thumb>$INFO[Window.Property(LatestSong.2.Thumb)]</thumb>
<visible>!IsEmpty(Window.Property(LatestSong.2.Album))</visible>
</item>
<item>
<label>$INFO[Window.Property(LatestSong.3.Album)]</label>
<label2>$INFO[Window.Property(LatestSong.3.Artist)]</label2>
<onclick>$INFO[Window.Property(LatestSong.3.Path),PlayMedia(,)]</onclick>
<Fanart>$INFO[Window.Property(LatestSong.3.Fanart)]</Fanart>
<thumb>$INFO[Window.Property(LatestSong.3.Thumb)]</thumb>
<visible>!IsEmpty(Window.Property(LatestSong.3.Album))</visible>
</item>
<item>
<label>$INFO[Window.Property(LatestSong.4.Album)]</label>
<label2>$INFO[Window.Property(LatestSong.4.Artist)]</label2>
<onclick>$INFO[Window.Property(LatestSong.4.Path),PlayMedia(,)]</onclick>
<Fanart>$INFO[Window.Property(LatestSong.4.Fanart)]</Fanart>
<thumb>$INFO[Window.Property(LatestSong.4.Thumb)]</thumb>
<visible>!IsEmpty(Window.Property(LatestSong.4.Album))</visible>
</item>
<item>
<label>$INFO[Window.Property(LatestSong.5.Album)]</label>
<label2>$INFO[Window.Property(LatestSong.5.Artist)]</label2>
<onclick>$INFO[Window.Property(LatestSong.5.Path),PlayMedia(,)]</onclick>
<Fanart>$INFO[Window.Property(LatestSong.5.Fanart)]</Fanart>
<thumb>$INFO[Window.Property(LatestSong.5.Thumb)]</thumb>
<visible>!IsEmpty(Window.Property(LatestSong.5.Album))</visible>
</item>
<item>
<label>$INFO[Window.Property(LatestSong.6.Album)]</label>
<label2>$INFO[Window.Property(LatestSong.6.Artist)]</label2>
<onclick>$INFO[Window.Property(LatestSong.6.Path),PlayMedia(,)]</onclick>
<Fanart>$INFO[Window.Property(LatestSong.6.Fanart)]</Fanart>
<thumb>$INFO[Window.Property(LatestSong.6.Thumb)]</thumb>
<visible>!IsEmpty(Window.Property(LatestSong.6.Album))</visible>
</item>
</content>
</control>
</include>