Bugzilla – Bug 11948
Add album to library from Rhapsody Direct munges favorites
Last modified: 2009-07-27 09:25:24 UTC
SqueezeCenter Version: 7.3.3 - 25911 @ Sat Apr 11 04:07:38 PDT 2009 To reproduce: Search Rhapsody Direct by album for "Elizabethan". The first return is "The Elizabethan Collar". (Note -- if you select the heart icon to the right of that album at this point, the add-to-favorites works correctly.) Select that album by clicking on "The Elizabethan Collar". Menu of tracks is displayed along with "All Songs" and "Add album to library". Click the heart to the right of "Add album to library". You will now have an entry in your Favorites entitled "Add album to library". It will have one track entitled "Album added to library". Also and for what it's worth, the heart to the right of "Add album to library" has hover text that says "Add to favorites". I don't know whether these are the same function but I suspect they are not; if not there is some confusion there.
Michael: Should we remove the 'favorites' icon from that menu?
Andy - do you have an idea for this?
I think the idea was you could add any XMLBrowser menu item to your favorites, so I don't think there's a bug here.
I originally said: "You will now have an entry in your Favorites entitled 'Add album to library'. It will have one track entitled 'Album added to library' ." Maybe I'm missing something, but that certainly seems like a bug to me. If it's not a bug (because the "menu item" is correctly being added), it's certainly a usability horror.
There's no way for the XMLBrowser menu to know what 'type' of menu "Add album to library" actually is. Originally I believe we had just type=audio or type=playlist items with favorite icons, but it was changed with the use case of adding a menu such as "Most Popular" Staff Picks to your favorites, or your favorite city from the radio directory.
This was originally there so you you could bookmark levels of the menu hierachy. It was used by AlienBBC and other parsing code to allow menu levels to be bookmarked in favorites. In this case I think they will have no type. Is there somethign special about the "Add album to libary" entry? Can we selectively add the favorite icon based on this. We could easily add a new hash key of nofavs or something? In S:W:XMLBrowser somewhere around line 661: for my $item (@items) { if ($item->{'url'} && !defined $item->{'favorites'}) { $item->{'favorites'} = $favs->hasUrl( $item->{'play'} || $item->{'url'} ) ? 2 : 1; } } We should avoid setting $item->{'favorites'} for this specific case. Can we identify what makes it special?
It returns a confirmation message instead of a sub-menu, but there is nothing to indicate this. I don't want to hardcode a list of 'bad' menus though. We'd have to add yet another attribute to indicate a menu that should be blocked from favorites.
Well at present the code assumes anything containing a url can be bookmarked. I think this is resonable? If there is a url as well as the message then it can currently be bookmarked.
We'll get back to it.