Bug 9863 - add a "favorites find <url>/id" command to CLI
: add a "favorites find <url>/id" command to CLI
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: unspecified
: All All
: -- enhancement (vote)
: 7.x
Assigned To: Andy Grundman
: ipeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-31 16:24 UTC by Joerg Schwieder
Modified: 2009-07-31 10:31 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Schwieder 2008-10-31 16:24:37 UTC
the iPeng skin has a feature that will always show you whether the currently playing track is in favorites and let you add/remove it with a sincle click toggle button.
This works for both database and url items.
The way it works is, it adds a TT ajax wrapper to the favorites plugin's index.html to return the "favorites" status of the current url:
[code]
IF ajaxRequest;
	FOREACH entry = entries;
		IF (entry.url == url);
			'index|'; entry.index;
		END;
	END;
ELSE;
[/code]

It scans the list of favorites for the requested url and if it finds it, it returns the favorites' id.

Now this is somewhat doable since it's TT and thus runs on the server. I could mimick this through the CLI by frequently querying the favorites list, yet that will cause a bit of traffic.

Would it be possible to add this as a query to the favorites query (or a different one)?

I could live with being able to query url items only, but being able to either use a url or a database id would be even better.

Or is there a simpler way to determine whether a track/url item is already a favorite?
Comment 1 Andy Grundman 2008-11-13 08:13:46 UTC
Change 23920.

New command is:

favorites exists <track id> | <url>

Returns:

exists:1 index:10

or

exists:0
Comment 2 James Richardson 2008-12-15 12:09:03 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 3 Chris Owens 2009-07-31 10:31:27 UTC
Reduce number of active targets for SC