Bugzilla – Bug 6699
Adding XMLBrowser items to favorites always sets type="audio"
Last modified: 2008-12-18 11:12:53 UTC
Even though you can add any XMLBrowser menu to favorites, they are always saved to favorites.opml as type="audio" so they don't browse properly.
Triode: This bit of code in OpmlFavorites.pm is the culprit I think, should we not just keep the same type as the original item? if ($parser) { $entry->{'parser'} = $parser; $entry->{'type'} = $type if $type; } elsif ($url !~ /\.opml$/) { $entry->{'type'} = 'audio'; };
OK, this patch fixes it for at least the case of adding a playlist (i.e. an LMA concert), but the problem is that adding menu items without a type (i.e. most menus that contain other menus) still get set as type="audio". Perhaps the web code should not let you add items without a type to favorites. --- Slim/Plugin/Favorites/OpmlFavorites.pm (revision 27475) +++ Slim/Plugin/Favorites/OpmlFavorites.pm (local) @@ -160,18 +160,14 @@ my $entry = { 'text' => $title, 'URL' => $url, + 'type' => $type || 'audio', }; if ($parser) { $entry->{'parser'} = $parser; - $entry->{'type'} = $type if $type; + } - } elsif ($url !~ /\.opml$/) { - - $entry->{'type'} = 'audio'; - }; - # add it to end of top level push @{$class->toplevel}, $entry;
I'm missing something Andy - I can already add menu levels from staff picks and alien to favorites as they are .opml urls - I think your patch will break this! For refered opml files the current code should not set a type - what do LMA concerts look like.
But look at all the SN services, none of those use URLs that end in ".opml" so it breaks there. Try adding the "Recent Additions" menu from LMA and you'll see what I mean. Also the same thing happens with Radiotime. The OPML SN returns looks like this: <?xml version="1.0" encoding="utf-8" ?> <opml version="1.1"> <head title="Live Music Archive"> <expansionState></expansionState> </head> <body> <outline URL="http://www.squeezenetwork.com:3000/api/lma/v1/opml/artists" text="Artists" /> <outline URL="http://www.squeezenetwork.com:3000/api/lma/v1/opml/recent" text="Recent Additions" /> <outline text="Search"> <outline URL="http://www.squeezenetwork.com:3000/api/lma/v1/opml/search?type=creator&q={QUERY}" text="Search by Artist" type="search" /> <outline URL="http://www.squeezenetwork.com:3000/api/lma/v1/opml/search?type=date&q={QUERY}" text="Search by Date" type="search" /> <outline URL="http://www.squeezenetwork.com:3000/api/lma/v1/opml/search?type=location&q={QUERY}" text="Search by Location" type="search" /> <outline URL="http://www.squeezenetwork.com:3000/api/lma/v1/opml/search?type=title&q={QUERY}" text="Search by Track" type="search" /> </outline> </body> </opml>
Fixed in change 16533. Still needs some cleanup on the SN side.
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.