erland wrote: > Not sure if Ratings Light have the same problem as I had with TrackStat > but in TrackStat it isnt possible to write to the database during > scanning, if I remember correctly the database just gave an error. If > the same thing happens in Ratings Light you might want to handle this. > In TrackStat I queue up the changed ratings during scanning and persist > them to the database when scanning is finished. However, it could be > that this doesnt happens in Ratings Light since you store ratings in > the standard tables and not in separate tables as TrackStat does. > > Anyway, just mentioning it so you are aware of it if you get similar > issues.
Thanks for making me aware. Since I've never used LMS while it's (re)scanning it would have never occurred to me to look for this. And it happens with RL too. I can see the code in TS for that. What's the easiest way to make LMS execute a function once the scan is completely finished? I'm working on the DynamicPlaylist integration part. And it seems I have a sql problem. I've successfully managed to rebuild a no-parameter playlist. But I have some other PLs with temporary tables. I've been using them for a long time with DynamicPlaylist (via custom SQLplaylist definitions). But they don't seem to work directly in DPL. Is it possible that DPL has a problem with temporary tables? Or that SQLplaylist does some translating I'm missing? Here's a simplified version with one parameter that returns zero tracks: Code: -------------------- $sql = "DROP TABLE IF EXISTS randomweightedratingshigh; DROP TABLE IF EXISTS randomweightedratingslow; DROP TABLE IF EXISTS randomweightedratingscombined; create temporary table randomweightedratingslow as select tracks.url as url from tracks join tracks_persistent on tracks.url=tracks_persistent.url and tracks_persistent.rating <= 49 limit 60; create temporary table randomweightedratingshigh as select tracks.url as url from tracks join tracks_persistent on tracks.url=tracks_persistent.url and tracks_persistent.rating > 49 limit 40; create temporary table randomweightedratingscombined as SELECT * FROM randomweightedratingslow UNION SELECT * from randomweightedratingshigh; SELECT * from randomweightedratingscombined ORDER BY random() limit 20; DROP TABLE randomweightedratingshigh; DROP TABLE randomweightedratingslow; DROP TABLE randomweightedratingscombined; "; -------------------- It doesn't seem to work in Database Query either. Seems only SQLplaylist can work with this. Any idea why? ------------------------------------------------------------------------ afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=113344
_______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins