[Slim-Checkins] r33650 - /7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm
| Newsgroups | gmane.music.equipment.slimdevices.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mherger
Date: Thu Nov 3 09:44:26 2011
New Revision: 33650
URL: http://svn.slimdevices.com/slim?rev=33650&view=rev
Log:
Bug: n/a
Description: don't queue up a track which we're already playing
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=33650&r1=33649&r2=33650&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm (original)
+++ 7.7/trunk/server/Slim/Plugin/MOG/ProtocolHandler.pm Thu Nov 3 09:44:26 2011
@@ -186,6 +186,13 @@
if ( main::DEBUGLOG && $log->is_debug ) {
$log->debug( 'getRadioTracks ok: ' . Data::Dump::dump($info) );
}
+
+ my $song = $client->playingSong();
+ my $currentId = 0;
+
+ if ($song && $song->track) {
+ ($currentId) = getIds($song->track->url || '');
+ }
my @tracks;
foreach my $track ( @$info ) {
@@ -193,6 +200,9 @@
# cache the metadata we need for display
my $trackId = delete $track->{id};
+
+ # don't queue track which we're already playing
+ next if $trackId == $currentId;
my $meta = {
artist => $track->{artist},