Bug 6781 - cannot add a year to favorites
: cannot add a year to favorites
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Player UI
: 7.0
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-25 11:55 UTC by Ben Klaas
Modified: 2009-09-08 09:22 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Klaas 2008-01-25 11:55:35 UTC
PlayerUI and WebUI both have the ability to add a year as a favorites, and the url isn't handled by favorites correctly


they both add the favorites url as:
db:year.id=<year>

error on squeezebox says "couln't resolve IP addess for db:year.id=..."

I tried a few other db strings that did not work
db:track.year.id=
db:track.year=
Comment 1 Michael Herger 2008-01-25 12:48:40 UTC
So... you can add this favorite, but when you want to play it, it fails with that error message?
Comment 2 Ben Klaas 2008-01-25 12:58:18 UTC
correct. you can add the favorite through either webUI or playerUI, but you can't play the favorite
Comment 3 Michael Herger 2008-01-25 13:10:41 UTC
genre very likely would have bailed too. Try this:

Index: D:/eclipse/trunk/server/Slim/Control/Commands.pm
===================================================================
--- D:/eclipse/trunk/server/Slim/Control/Commands.pm	(revision 16707)
+++ D:/eclipse/trunk/server/Slim/Control/Commands.pm	(working copy)
@@ -2831,6 +2831,8 @@
 	if (blessed($obj) && (
 		$class eq 'Album' || 
 		$class eq 'Contributor' || 
+		$class eq 'Genre' || 
+		$class eq 'Year' || 
 		($obj->can('content_type') && $obj->content_type ne 'dir'))) {
 
 		my $terms = sprintf('%s.id=%d', lc($class), $obj->id);
Comment 4 Ben Klaas 2008-01-25 13:25:07 UTC
Pretty funny...I was just going to add a comment saying "hey, genres are broken too!"

Your patch works well--I'm going to fold that into my big checkin for Jive favorites support. Will close this bug when I do.
Comment 5 KDF 2008-01-25 13:31:29 UTC
Have you looked at the log for this?

[13:29:54.7419] Slim::bootstrap::tryModuleLoad (266) Warning: Module [1] failed to load:
syntax error at (eval 1240) line 1, near "use 1 ("

[13:29:54.7445] Slim::Player::ProtocolHandlers::loadHandler (115) Warning: Couldn't load class: [1] - [syntax error at (eval 1240) line 1, near "use 1 ("
]
[13:29:54.7549] Slim::bootstrap::tryModuleLoad (266) Warning: Module [1] failed to load:

The protocol handler is being activated as if this were a remote url, but the protocolHandlers hash uses 1 to say it's valid url, but local. Probably makes no sense to try to load a module named "1"
Comment 6 Michael Herger 2008-01-25 13:40:52 UTC
Look at the patch: the year and genre queries were not correctly recognized as DB queries, thus it fell back to remote URL handling. Which cause the above error messages.
Comment 7 Ben Klaas 2008-01-25 14:47:05 UTC
fixed in change 16768
Comment 8 Chris Owens 2008-03-07 09:04:36 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.