mhsparks wrote: 
> Another oddity is that sometimes the spotify tracks are added to the
> dynamicplaylist_history table with an incorrect id (large negative
> number). The insert seems to be done here
> 
> my $sth = $dbh->prepare( "INSERT INTO dynamicplaylist_history
> (client,id,url,added,skipped) values (?,".$track->id.", ?,
> ".$addedTime.",".$skipped.")" );
> 
> So it would see something is wrong with the track object, the url is
> always correct though. I suspect the only problematic behaviour this
> could cause is that tracks could be played twice.
> 

Are you saying that the same track have a different id in tracks table
?
Or does it have the same large negative number in tracks table ?

It might not be a problem if it’s negative but if it doesn’t match the
id in tracks table it will cause the side effects you describe that the
same track might be played twice before all other tracks matching the
playlist filter has been played. I don’t think the track id is
guaranteed to be a positive sequence number. A more worrying issue is
that I’m pretty sure I don’t modify the track id, so if it’s incorrect
it likely means that the objectForUrl correction Michael did might not
work correctly and that could possibly cause issues in other places of
LMS and other plugins.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
*Starting with LMS 8.0 I no longer support my plugins/applets* ('see
here for more information'
(https://forums.slimdevices.com/showthread.php?49483-Announce-New-versions-of-erlands-plugins&p=998836&viewfull=1#post998836)
)
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=49483

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to