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
_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to