2009-08-05, 20:44
Here is a new version of RecentlyAdded.py
http://xbmc-addons.googlecode.com/svn/pa...lyAdded.py
*new: "alarm" parameter.
most skins run this script whenever you enter home. with the new alarm parameter, if you have a control in home.xml to execute the script, you can set <defaultcontrol always="false"> then the script does not have to run everytime you enter home. if you can have the control in startup.xml. the bad thing about startup.xml, if you have a setting to enable this. you will have to restart xbmc once enabled.
you can pass the following optional parameters:
* when alums=True, only one song is still played (developers any help)
separate parameters with "&" minus quotes
example (the setproperty and visible is for aeon, when the main menu loses focus control 8999 can gain focus with navigating. you skin may not need this):
properties available:
totals:
movies %d=1 to LIMIT:
tv shows %d=1 to LIMIT:
music %d=1 to LIMIT:
http://xbmc-addons.googlecode.com/svn/pa...lyAdded.py
*new: "alarm" parameter.
most skins run this script whenever you enter home. with the new alarm parameter, if you have a control in home.xml to execute the script, you can set <defaultcontrol always="false"> then the script does not have to run everytime you enter home. if you can have the control in startup.xml. the bad thing about startup.xml, if you have a setting to enable this. you will have to restart xbmc once enabled.
you can pass the following optional parameters:
PHP Code:
limit=# ; # to limit returned results (default=5)
partial=True ; True to returned only items unfinished (default=False)
albums=True ; True to return albums instead of songs (default=False)
unplayed=True ; True to return only items that have not been played (default=False)
totals=True ; True to return database totals (default=False)
trailer=True ; True to play the trailer (if available) (default=False)
alarm=# ; every # minutes run script (default=0, no alarm)
* when alums=True, only one song is still played (developers any help)
separate parameters with "&" minus quotes
example (the setproperty and visible is for aeon, when the main menu loses focus control 8999 can gain focus with navigating. you skin may not need this):
PHP Code:
<defaultcontrol always="false">8999</defaultcontrol>
<control type="button" id="8999">
<posx>-100</posx>
<posy>-100</posy>
<width>0</width>
<height>0</height>
<onfocus>XBMC.RunScript(special://skin/extras/RecentlyAdded.py,limit=5&alarm=30&albums=True&unplayed=True&totals=$INFO[Skin.HasSetting(WidgetLatestAddedTotals)])</onfocus>
<onfocus>SetFocus(300)</onfocus>
</control>
properties available:
totals:
PHP Code:
"Movies.Count"
"Movies.Watched"
"Movies.UnWatched"
"Movies.LastWatchedTitle"
"Movies.LastWatchedYear"
"Movies.LastWatchedRuntime"
"Movies.LastWatchedGenre"
"Movies.LastWatchedDate"
"MusicVideos.Count"
"MusicVideos.Watched"
"MusicVideos.UnWatched"
"TVShows.Count"
"TVShows.Watched"
"TVShows.UnWatched"
"Episodes.Count"
"Episodes.Watched"
"Episodes.UnWatched"
"Music.SongsCount"
"Music.AlbumsCount"
"Music.ArtistsCount"
movies %d=1 to LIMIT:
PHP Code:
"LatestMovie.%d.Title"
"LatestMovie.%d.Rating"
"LatestMovie.%d.Year"
"LatestMovie.%d.RunningTime"
"LatestMovie.%d.Path"
"LatestMovie.%d.Trailer"
"LatestMovie.%d.Fanart"
"LatestMovie.%d.Thumb"
tv shows %d=1 to LIMIT:
PHP Code:
"LatestEpisode.%d.ShowTitle"
"LatestEpisode.%d.EpisodeTitle"
"LatestEpisode.%d.EpisodeNo"
"LatestEpisode.%d.Rating"
"LatestEpisode.%d.Path"
"LatestEpisode.%d.Fanart"
"LatestEpisode.%d.Thumb"
music %d=1 to LIMIT:
PHP Code:
"LatestSong.%d.Title"
"LatestSong.%d.Year"
"LatestSong.%d.Artist"
"LatestSong.%d.Album"
"LatestSong.%d.Path"
"LatestSong.%d.Fanart"
"LatestSong.%d.Thumb"