mherger wrote: > > When later adding the tracks to current playlist Iâm using: > > > > $request = $client->execute(['playlist', 'addtracks', 'listRef', > $filteredItems]); > > > > Would it work with a database track object in $filteredItems or would > it > > require a remote track object if available? > > Just checking to know if the plugin would need the remote track > object > > anyway to be able to play the track. If it isnât needed to play > the > > track are there other situations where the database track object > isnât > > enough and a plugin would really need to remote track object ? > > $filteredItems can be a list of URLs. No need to send full objects. > > > Could the plugin just make a call like this to get the database track > > object ? > > If you really need it (not in above case). > > > my $track = Slim::Schema->rs(âTrackâ)->single({ 'url' => $url > }); > > Yes! That's pretty exactly what objectForUrl() eventually does (for > database objects): > > https://github.com/Logitech/slimserver/blob/e64c0e31caf4ebd7a77ce480db3395e35d33bd6e/Slim/Schema.pm#L2308 > > > -- > > Michael
Then my suggestion is that we are satisfied with your current correction in 8.2 and if anyone sees a problem with remote tracks being repeated they can implement it in the plugin by making a call to: Slim::Schema->rs('Track')->single({ 'url' => $url }); To get the database track id in case a remote track object has been returned from objectForUrl. I dont think it makes sense to add another parameter/method to return database track object to LMS core if the only code that uses them is an unsupported plugin. Its likely going to be forgotten during verification in the future when it isnt used by LMS itself or the plugins bundled with LMS. 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 plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins