Bug 10045 - Shoutcast "Top 500" aren't sorted by popularity any more
: Shoutcast "Top 500" aren't sorted by popularity any more
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: unspecified
: PC Windows XP
: P3 normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-18 04:04 UTC by Michael Herger
Modified: 2008-11-18 07:26 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 Michael Herger 2008-11-18 04:04:15 UTC
The list is alphabetically sorted in web and player UI
Comment 1 Michael Herger 2008-11-18 04:32:25 UTC
Untested patch:

Index: D:/eclipse/SN/lib/SDI/SqueezeNetwork/Controller/API/Shoutcast/V1/OPML.pm
===================================================================
--- D:/eclipse/SN/lib/SDI/SqueezeNetwork/Controller/API/Shoutcast/V1/OPML.pm	(revision 5047)
+++ D:/eclipse/SN/lib/SDI/SqueezeNetwork/Controller/API/Shoutcast/V1/OPML.pm	(working copy)
@@ -184,6 +184,10 @@
 	my $bitrate_limit = $c->stash->{prefs}->{plugin_shoutcast_bitrate_limit} || 999;
 	my $sort_by       = $c->stash->{prefs}->{plugin_shoutcast_sort} || 'lc';
 	
+	if ( $query =~ /Top500/ ) {
+		$sort_by  = 'lc';
+	}
+	
 	my $items = [];
 	
 	my $tunein_base = $c->stash->{sc}->base . $stations->{tunein}->{base};


Additionally the cache should be invalidated if the sort order is changed. Or add the sort order to the url as the cache key.
Comment 2 Andy Grundman 2008-11-18 07:07:12 UTC
Shouldn't the list be sorted by the user's preference?
Comment 3 Michael Herger 2008-11-18 07:26:36 UTC
Ok, checked that change in. Let's see what the users think about it.