2012-02-10, 12:41
Hello.
I have written a script that scan Video library and return movies (Random or recently added) that match video smartplaylist.
Frodo ONLY
Release version is located in offcial repo (can't be installed through normal addon browser or is auto pulled when installed skins)
http://mirrors.xbmc.org/addons/frodo/
For new skin labels see readme
Github page:
https://github.com/XBMC-Addons/script.ra...dlastitems
------------------------------------------------------------
Eden ONLY
Parameters are :
/!\ CAUTION /!\
resume=True can slow down script when working on playlist
Script call :
As you set playlist= parameter, type=Movie is no longer needed.
Properties returned to Home window (id : 10000) are :
So with the precedent calling, properties will be :
Script is still in development.
Changelog
Download : http://passion-xbmc.org/addons/Download....-1.2.5.zip
I have written a script that scan Video library and return movies (Random or recently added) that match video smartplaylist.
Frodo ONLY
Release version is located in offcial repo (can't be installed through normal addon browser or is auto pulled when installed skins)
http://mirrors.xbmc.org/addons/frodo/
For new skin labels see readme
Github page:
https://github.com/XBMC-Addons/script.ra...dlastitems
------------------------------------------------------------
Eden ONLY
Parameters are :
Code:
type = Movie/Episode/Music | Script will request Movie database or Episode database
| (/!\ Caution : upper and lower case are important)
limit = # | # to limit returned results (default=10)
method = Last/Random | Last to get last added items and Random to get random items
playlist = PathAndNameOfPlaylist | Name of the smartplaylist like special://masterprofile/playlists/video/children.xsp
| or empty to request global database
| If you set this parameter, you don't need to set type= because type will be read from playlist file
menu = NameOfMenu | Name of custom or standard menu which display the widget
unwatched = True/False | unwatched=True to filter only unwatched items
resume = True/False | resume=True to filter only partially watched items
propertie = NameOfTheProperty | You can overwrite the default properties names Playlist<method><type><menu> by using this parameter
| example : propertie=CustomMenu1Widget1
/!\ CAUTION /!\
resume=True can slow down script when working on playlist
Script call :
Code:
XBMC.RunScript(script.RandomAndLastItems,type=Movie,limit=10,method=Random,playlist=special://masterprofile/playlists/video/children.xsp,menu=Menu1)
As you set playlist= parameter, type=Movie is no longer needed.
Properties returned to Home window (id : 10000) are :
Code:
* type=Movie
Playlist<method>Movie<menu>.Type = Movie
Playlist<method>Movie<menu>.Count = Number of movies in library or playlist
Playlist<method>Movie<menu>.Unwatched = Number of unwatched movies in library or playlist
Playlist<method>Movie<menu>.Watched = Number of watched movies in library or playlist
Playlist<method>Movie<menu>.<# of movie>.Rating = Movie N°# rate
Playlist<method>Movie<menu>.<# of movie>.Plot = Movie N°# plot
Playlist<method>Movie<menu>.<# of movie>.RunningTime = Movie N°# running time
Playlist<method>Movie<menu>.<# of movie>.Path = Movie N°# path (eg : C:\Movies\Movie1\Movie1.mkv)
Playlist<method>Movie<menu>.<# of movie>.Rootpath = Movie N°# root path (eg : C:\Movies\Movie1\)
Playlist<method>Movie<menu>.<# of movie>.Fanart = Movie N°# fanart
Playlist<method>Movie<menu>.<# of movie>.Thumb = Movie N°# thumbnail
Playlist<method>Movie<menu>.<# of movie>.Title = Movie N°# title
Playlist<method>Movie<menu>.<# of movie>.Year = Movie N°# year
Playlist<method>Movie<menu>.<# of movie>.Trailer = Movie N°# trailer
Playlist<method>Movie<menu>.<# of movie>.Resolution = Movie N°# (values are blank, 480, 540, 576, 720, 1080)
* type=Episode
Playlist<method>Episode<menu>.Type = Episode
Playlist<method>Episode<menu>.Count = Number of episodes in library or playlist
Playlist<method>Episode<menu>.Unwatched = Number of unwatched episodes in library or playlist
Playlist<method>Episode<menu>.Watched = Number of watched episodes in library or playlist
Playlist<method>Episode<menu>.TvShows = Number of TV shows in library or playlist
Playlist<method>Episode<menu>.<# of episode>.Rating = Episode N°# rate
Playlist<method>Episode<menu>.<# of episode>.Plot = Episode N°# plot
Playlist<method>Episode<menu>.<# of episode>.RunningTime = Episode N°# running time
Playlist<method>Episode<menu>.<# of episode>.Path = Episode N°# path (ex : C:\TVShows\TVShow1\Season1\Episode1.avi)
Playlist<method>Episode<menu>.<# of episode>.Rootpath = Episode N°# root path (ex : C:\TVShows\TVShow1\)
Playlist<method>Episode<menu>.<# of episode>.Fanart = Episode N°# fanart
Playlist<method>Episode<menu>.<# of episode>.Thumb = Episode N°# thumbnail
Playlist<method>Episode<menu>.<# of episode>.ShowTitle = Episode N°# TV Show title
Playlist<method>Episode<menu>.<# of episode>.EpisodeTitle = Episode N°# title
Playlist<method>Episode<menu>.<# of episode>.EpisodeNo = Episode N°# (format sXXeXX)
Playlist<method>Episode<menu>.<# of episode>.EpisodeSeason = Episode N°# season number
Playlist<method>Episode<menu>.<# of episode>.EpisodeNumber = Episode N°# number
Playlist<method>Episode<menu>.<# of episode>.TVShowFanart = TV Show fanart for episode N°#
Playlist<method>Episode<menu>.<# of episode>.TVShowThumb = TV Show thumbnail for episode N°#
* type=Music
Playlist<method>Music<menu>.Type = Music
Playlist<method>Music<menu>.Artists = Number of artists in library or playlist
Playlist<method>Music<menu>.Albums = Number of albums in library or playlist
Playlist<method>Music<menu>.Songs = Nombre of songs in library or playlist
Playlist<method>Music<menu>.<# of album>.Album = Album N°# title
Playlist<method>Music<menu>.<# of album>.Artist = Album N°# artist name
Playlist<method>Music<menu>.<# of album>.Year = Album N°# year
Playlist<method>Music<menu>.<# of album>.Fanart = Album N°# fanart
Playlist<method>Music<menu>.<# of album>.Thumb = Album N°# thumbnail
Playlist<method>Music<menu>.<# of album>.ArtistPath = Album N°# artist path (eg : C:\Music\Artist1)
Playlist<method>Music<menu>.<# of album>.AlbumPath = Album N°# path (ex : C:\Music\Artist1\Album1)
Playlist<method>Music<menu>.<# of album>.AlbumDesc = Album N°# description
Playlist<method>Music<menu>.<# of album>.PlayPath = Album N°# for playing (musicdb://3/1/)
So with the precedent calling, properties will be :
Code:
PlaylistRandomMovieMenu1.Count
PlaylistRandomMovieMenu1.1.Title
...
...
PlaylistRandomMovieMenu1.10.Title
Script is still in development.
Changelog
Code:
v1.2.5
- [Add] New properties TVShowThumb and TVShowFanart to get TV Show thumbnail and fanart of the episode
v1.2.4
- [Fix] Albums properties were not cleared properly
- [Add] New property AlbumDesc
v1.2.3
- [Fix] Episode title is now based on title and not on label because of some JSON changes :
http://forum.xbmc.org/showthread.php?tid=113702&pid=1047340&highlight=episodetitle#pid1049580
v1.2.2
- [Fix] Statistic for songs was wrong on library or albums playlist
v1.2.1
- [Add] The script now manage Music (playlists or library).
See README.txt or LISEZMOI.txt for details.
v1.2.0
- [Add] Property .Type is returned. Value is Movie or Episode.
Helpfull if you use script with playlist and did not specifie type= parameter so script will get type from playlist.
v1.1.9
- [Fix] If video has no stream details, resolution is set to blank
v1.1.8
- [Add] New property Resolution for Movies. Values are blank, 480, 540, 576, 720, 1080
v1.1.7
- [Fix] When type= was not set with playlist, properties name was unwellformed
v1.1.6
- [Add] If playlist= is set and type= is not seet then playlist type is read from playlist file
v1.1.5
- [Add] Properties are cleared only if needed to avoid blinking effect in widgets
v1.1.4
- [Fix] Properties were not cleaned between two call
v1.1.3
- [Fix] resume= and watched= were inefficient with playlists
- [Add] Propertie TvShows set to number of TV Shows in library or playlist
v1.1.2
- [Fix] Season number printed in 2 digit only if needed
- [Fix] Properties Count, Watched and Unwatched = 0 if playlist or library is empty
v1.1.1
- [Add] Script can manage tv shows and episodes playlist
- [Add] Propertie Rootpath to get the directory of the movie or the tvshow (to display extrafanarts and so on)
v1.1.0
- [Fix] resume= is unable but can slow down the script (see README.txt or LISEZMOI.txt)
- [Add] You can now get last added or random episodes from series (work only on Library not on Playlist)
v1.0.6
- [Fix] Handle exception when playlist is empty or fetching information failed
- resume= parameter is disable because of a bug in method GetDirectory of JSONRPC API
v1.0.5
- [Add] Playlist<method>Movie<menu>.Unwatched return the number of unwatched movies in the library/playlist
- [Add] Playlist<method>Movie<menu>.Watched return the number of watched movies in the library/playlist
v1.0.4
- [Fix] Scanning movies of movie set always scan same set (constant instead af variable in the code).
- [Add] Playlist<method>Movie<menu>.Count now return the number of movies in the library/playlist
v1.0.3
- [Fix] Trailer is now provide properly
v1.0.2
- [Fix] Last added movies really return last added movies. Movies in set are handle properly.
- [Added] New options
UNWATCHED
True : Display only unwatched movies
False : Display watched and unwatched movies
RESUME
True : Display only movie partially watched movie
False : Display all movies
v1.0.1
- Use Files.GetDirectory instead of parsing XML playlist to retrieve movies
v1.0.0
- from v3.0.7 of RandomItems script, add playlist filters
Download : http://passion-xbmc.org/addons/Download....-1.2.5.zip