gbronzer Wrote: > > ... > It sounds like your plugin already stores the data I use, and mines > written mostly with SQL queries (SQL 2000). I could adapt them to > MySQL. The key is whether you can dynamically choose a new song and add > it to the playlist in realtime.
The TrackStat plugin stores data about: - rating - play count - last played time The rating is stored whenever the user changes the rating for the currently playing song. The play count and last played time is stored at the end of the currently playing song if it has played long enough. It does not store the play count and last played time if you just play the first 10 seconds of a song, this is a difference of the standard last played time and play counts in slimserver which stores this information even if you just plays the first second of the song. The SQLPlayList plugin is creates a dynamic playlist in runtime based on the SQL query you have specified in the playlist. Each time a song has been played the SQL query is executed and new songs are added to the playlist according to the result of the executed query. So I think you should be able to create a playlist like you want by combining TrackStat and SQLPlayList plugins. The trick is just to create the correct SQL queries. A playlist in SQLPlayList can be based on several SQL statments, it will only collect the result from those beginning with the word SELECT. There are some example playlists included in the README file in the SQLPLayList plugin that shows you how to create a dynamic playlists such as: - Tracks never played - Top rated songs (this uses rating from TrackStat) - Random tracks but exclude certain genres and albums The only requirement is that you know how to create a SQL statements that returns the song you dynamically want to add to the playlist. The SQL statement can use all information available in any table in the slimserver database. But you may not just be interested in creating a playlist, you maybe want to make slimserver send track information to your existing application and you may want slimserver to ask your existing application for the next song to play ? If this is what you want to do I suggest that you look at: - RandomPlay plugin or SQLPlayList plugin to see how add a new song to the playlist when the previously song finish. SQLPlayList is based on the RandomPlay plugin code. - iTunesUpdate plugin or TrackStat plugin to see how to get track information at the end of a song and send it to an external application/database. TrackStat is based on the iTunesUpdate plugin code. -- erland Erland Isaksson 'My homepage' (http://erland.homeip.net) 'My download page' (http://erland.homeip.net/download) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=20533 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/plugins
