mherger wrote:
> idForObject sounds a bit like $track->id - which would return that
> negative value.
>
> I was considering an additional parameter (or flag in the arguments) to
> force looking up the database object. But I rejected that idea in favour
> of what we have now because it would have required a change on your end.
> Now is somebody wanted to pick this up, I'd be happy to add that flag.
> It's only two or three lines of code to add, and it wouldn't change any
> behaviour for existing callers.
When later adding the tracks to current playlist Im using:
Code:
--------------------
$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 isnt needed to play the
track are there other situations where the database track object isnt
enough and a plugin would really need to remote track object ?
Could the plugin just make a call like this to get the database track
object ?
Code:
--------------------
my $track = Slim::Schema->rs(Track)->single({ 'url' => $url });
--------------------
Or would it cause other side effects if it doesnt retrieve it through
objectForUrl method ?
Just asking to see if we can avoid adding adding extra complexity to LMS
core if we need to adapt the code in the plugin anyway.
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