Author: mherger
Date: Thu Nov 3 07:05:48 2011
New Revision: 33648
URL: http://svn.slimdevices.com/slim?rev=33648&view=rev
Log:
Bug: n/a
Description: don't limit radio track requests in the number of tracks. We get better mixes if requesting large chunks instead of single digit number of tracks.
Modified:
7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm
Modified: 7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm?rev=33648&r1=33647&r2=33648&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm (original)
+++ 7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm Thu Nov 3 07:05:48 2011
@@ -16,7 +16,7 @@
use Slim::Utils::Timers;
use Slim::Utils::Prefs;
-use constant MAX_RADIO_QUEUE => 10;
+use constant MIN_RADIO_QUEUE => 10;
my $log = Slim::Utils::Log->addLogCategory( {
category => 'plugin.mog',
@@ -143,7 +143,7 @@
}
sub _getRadioTracks {
- my ( $client, $id, $count ) = @_;
+ my ( $client, $id ) = @_;
main::DEBUGLOG && $log->is_debug && $log->debug("Getting tracks for station $id from SN");
@@ -164,7 +164,7 @@
$http->get(
Slim::Networking::SqueezeNetwork->url(
- '/api/mog/v1/playback/getRadioTracks?radioid=' . $id . '&count=' . $count
+ '/api/mog/v1/playback/getRadioTracks?radioid=' . $id
)
);
}
@@ -538,8 +538,8 @@
my $length = Slim::Player::Playlist::count($client);
- if ($length < MAX_RADIO_QUEUE) {
- _getRadioTracks($client, $radioId, MAX_RADIO_QUEUE - $length);
+ if ($length < MIN_RADIO_QUEUE) {
+ _getRadioTracks($client, $radioId);
}
}
}
@@ -573,7 +573,7 @@
$client->execute([ 'playlist', 'delete', $pos ]);
}
- _getRadioTracks($client, $radioId, 10);
+ _getRadioTracks($client, $radioId);
$request->setStatusDone();
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.