anonymous247;149262 Wrote:
> 1. Is there an COMPLETE, SHORT DynamicPlaylist example? (the example
> in the README.TXT for DynamicPlaylist isn't complete)
> See the attached zip file. It contains a VERY hardcoded playlist that
just plays two tracks over and over again. The README.txt sample hasn't
been updated for 6.5 yet so thats why it doesn't work.
As I understand it slimserver can't play tracks that isn't in the
database, so if thats the case for you you will have to do something
like this in the getNextDynamicPlayListTracks:
1. Get the full filename to the track you would like to play, this
probably includes scanning the directory you are interesting in for
files. Have a look at slimserver code in Slim/Utils/Scanner.pm
(findFilesMatching) or maybe Slim/Utils/Misc.pm (readDirectory)
2. Use Slim::Utils::Misc::fileURLFromPath to convert the file path to
an URL
3. Use Slim::Schema->updateOrCreate to check if the file exists in
slimserver and add them if they don't exist
4. Return the tracks
If you know that the files are in the slimserver database, you can
search the database directly instead of the steps above using the
Slim::Schema->resultset('Track')->search method.
+-------------------------------------------------------------------+
|Filename: PlayListSample.zip |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=1888|
+-------------------------------------------------------------------+
--
erland
Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-trackstat)
, 'SQLPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-sqlplaylist)
, 'DynamicPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-dynamicplaylist),
'Custom Browse'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-custombrowse)
and 'RandomPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-randomplaylist)
plugins)
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=28999
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins