diff --git a/HTML/EN/html/docs/cli-api.html b/HTML/EN/html/docs/cli-api.html index 20705c14b79..00b4203896f 100644 --- a/HTML/EN/html/docs/cli-api.html +++ b/HTML/EN/html/docs/cli-api.html @@ -8838,7 +8838,7 @@

fulltextsearch
  • - Live Music Archive, MP3tunes, Pandora, Podcasts, RadioTime, Napster, Shoutcast, Staff Picks, RSS + Live Music Archive, Pandora, Podcasts, RadioTime, Napster, Shoutcast, Staff Picks, RSS
  • Favorites @@ -8923,7 +8923,7 @@

      cmd - Command, one of "lma", "mp3tunes", + Command, one of "lma", "pandora", "podcast", "radiotime", "rhapsodydirect", "shoutcast", " or "picks", or any other, additionally installed radio or music service @@ -9008,13 +9008,13 @@


    - Live Music Archive, MP3tunes, Pandora, Podcasts, RadioTime, Napster, Shoutcast, Staff Picks, RSS + Live Music Archive, Pandora, Podcasts, RadioTime, Napster, Shoutcast, Staff Picks, RSS

    <playerid> - <lma|mp3tunes|pandora|podcast|radiotime|rhapsodydirect|shoutcast|picks|rss> + <lma|pandora|podcast|radiotime|rhapsodydirect|shoutcast|picks|rss> items <start> <itemsPerResponse> @@ -9216,7 +9216,7 @@

    <playerid> - <lma|mp3tunes|pandora|podcast|radiotime|rhapsodydirect|shoutcast|picks|rss> + <lma|pandora|podcast|radiotime|rhapsodydirect|shoutcast|picks|rss> playlist <play|load|insert|add> <taggedParameters> diff --git a/Slim/Control/XMLBrowser.pm b/Slim/Control/XMLBrowser.pm index 2c528384eb3..c8b1263a165 100644 --- a/Slim/Control/XMLBrowser.pm +++ b/Slim/Control/XMLBrowser.pm @@ -1441,7 +1441,6 @@ sub _cliQuery_done { # make a best effort to make a labeled title for the search my $queryTypes = { rhapsodydirect => 'PLUGIN_RHAPSODY_DIRECT_MODULE_NAME', - mp3tunes => 'PLUGIN_MP3TUNES_MODULE_NAME', radiotime => 'PLUGIN_RADIOTIME_MODULE_NAME', slacker => 'PLUGIN_SLACKER_MODULE_NAME', lma => 'PLUGIN_LMA_MODULE_NAME', diff --git a/Slim/Player/Protocols/HTTP.pm b/Slim/Player/Protocols/HTTP.pm index efcb1446474..5d38586e1fb 100644 --- a/Slim/Player/Protocols/HTTP.pm +++ b/Slim/Player/Protocols/HTTP.pm @@ -59,7 +59,7 @@ sub new { ${*$self}{'client'} = $args->{'client'}; ${*$self}{'url'} = $args->{'url'}; - ${*$self}{'_class'} = $class; + ${*$self}{'_class'} = $class; return $self; } @@ -79,14 +79,14 @@ sub close { } elsif ($enhanced->{'status'} && $enhanced->{'status'} > IDLE) { # disconnect persistent session (if any) $enhanced->{'session'}->disconnect; - } + } } sub response { my $self = shift; my ($args, $request, @headers) = @_; - # HTTP headers have now been acquired in a blocking way + # HTTP headers have now been acquired in a blocking way my $enhance = $self->canEnhanceHTTP($args->{'client'}, $args->{'url'}); return unless $enhance; @@ -99,11 +99,11 @@ sub response { if ($uri !~ /^https?/) { my ($proto, $host, $port) = $args->{'url'} =~ m|(.+)://(?:[^\@]*\@)?([^:/]+):*(\d*)|; $request_object->uri("$proto://$host" . ($port ? ":$port" : '') . $uri); - } + } my ($first) = $self->contentRange =~ /(\d+)-/; my $length = $self->contentLength; - + ${*$self}{'_enhanced'} = { 'session' => Slim::Networking::Async::HTTP->new, 'request' => $request_object, @@ -116,7 +116,7 @@ sub response { }; main::INFOLOG && $log->is_info && $log->info("Using Persistent service for $args->{'url'}"); - } else { + } else { # enable fast download of body to a file from which we'll read further data # but the switch of socket handler can only be done within _sysread otherwise # we will timeout when there is a pipeline with a callback @@ -159,7 +159,7 @@ sub request { if ($formatClass->can('getInitialAudioBlock')) { $song->initialAudioBlock($formatClass->getInitialAudioBlock($fh, $track, $seekdata->{timeOffset} || 0)); } - + $song->initialAudioBlock('') unless defined $song->initialAudioBlock; $fh->close if $fh; @@ -178,7 +178,7 @@ sub request { ${*$self}{'initialAudioBlockRef'} = $blockRef; ${*$self}{'initialAudioBlockRemaining'} = length $$blockRef; - # dynamic headers need to be re-calculated every time + # dynamic headers need to be re-calculated every time $song->initialAudioBlock(undef) if $processor->{'initial_block_type'}; main::DEBUGLOG && $log->debug("streaming $args->{url} with header of ", length $$blockRef, " from ", @@ -197,14 +197,14 @@ sub readMetaData { my $metadataSize = 0; my $byteRead = 0; - # some streaming servers might align their chunks on metadata which means that + # some streaming servers might align their chunks on metadata which means that # we might wait a long while for the 1st byte. We don't want about busy loop, so # exit if we don't have one. But once we have it, rest shall follow shortly if (!readChunk($self, $metadataSize, 1)) { $log->debug("Metadata byte not read, trying again: $!"); return undef; - } + } $metadataSize = ord($metadataSize) * 16; @@ -391,11 +391,11 @@ sub parseMetadata { sub canEnhanceHTTP { return $prefs->get('useEnhancedHTTP'); -} +} sub canDirectStream { my ($class, $client, $url, $inType) = @_; - + # when persistent is used, we won't direct stream to enable retries return 0 if $class->canEnhanceHTTP($client, $url); @@ -455,28 +455,28 @@ sub readChunk { } sub readPersistentChunk { - my $enhanced = shift; + my $enhanced = shift; my $self = $_[0]; # read directly from socket if primary connection is still active if ($enhanced->{'status'} == IDLE) { my $readLength = $self->_sysread($_[1], $_[2], $_[3]); $enhanced->{'first'} += $readLength; - + # return sysread's result UNLESS we reach eof before expected length return $readLength unless defined($readLength) && !$readLength && $enhanced->{'first'} != $self->contentLength; - } + } # all received using persistent connection return 0 if $enhanced->{'status'} == DISCONNECTED; # if we are not streaming, need to (re)start a session if ( $enhanced->{'status'} <= READY ) { - my $request = $enhanced->{'request'}; + my $request = $enhanced->{'request'}; my $last = $enhanced->{'length'} - 1 if $enhanced->{'length'}; - + $request->header( 'Range', "bytes=$enhanced->{'first'}-$last"); - $enhanced->{'status'} = CONNECTING; + $enhanced->{'status'} = CONNECTING; $enhanced->{'lastSeen'} = undef; $log->warn("Persistent streaming from $enhanced->{'first'} for ${*$self}{'url'}"); @@ -502,15 +502,15 @@ sub readPersistentChunk { # the child socket is non-blocking so we can safely call read_entity_body which calls sysread # if buffer is empty. This is normally a callback used when select() indicates pending bytes my $bytes = $enhanced->{'session'}->socket->read_entity_body($_[1], $_[2]) if $enhanced->{'status'} == CONNECTED; - + # note that we use EINTR with empty buffer because EWOULDBLOCK allows Source::_readNextChunk # to do an addRead on $self and would not work as primary socket is closed if ( $bytes && $bytes != -1 ) { $enhanced->{'first'} += $bytes; $enhanced->{'lastSeen'} = time(); return $bytes; - } elsif ( $bytes == -1 || (!defined $bytes && $enhanced->{'errors'} < $enhanced->{'max'} && - ($enhanced->{'status'} != CONNECTED || $! == EINTR || $! == EWOULDBLOCK) && + } elsif ( $bytes == -1 || (!defined $bytes && $enhanced->{'errors'} < $enhanced->{'max'} && + ($enhanced->{'status'} != CONNECTED || $! == EINTR || $! == EWOULDBLOCK) && (!defined $enhanced->{'lastSeen'} || time() - $enhanced->{'lastSeen'} < 5)) ) { $! = EINTR; main::DEBUGLOG && $log->is_debug && $log->debug("need to wait for ${*$self}{'url'}"); @@ -521,7 +521,7 @@ sub readPersistentChunk { main::INFOLOG && $log->is_info && $log->info("end of ${*$self}{'url'} s:", time() - $enhanced->{'lastSeen'}, " e:$enhanced->{'errors'}"); return 0; } else { - $log->warn("unexpected connection close at $enhanced->{'first'}/$enhanced->{'length'} for ${*$self}{'url'}\n\tsince:", + $log->warn("unexpected connection close at $enhanced->{'first'}/$enhanced->{'length'} for ${*$self}{'url'}\n\tsince:", time() - $enhanced->{'lastSeen'}, "\n\terror:", ($! != EINTR && $! != EWOULDBLOCK) ? $! : "N/A"); $enhanced->{'session'}->disconnect; $enhanced->{'status'} = READY; @@ -532,7 +532,7 @@ sub readPersistentChunk { } sub readBufferedChunk { - my $enhanced = shift; + my $enhanced = shift; my $self = $_[0]; # first, try to read from buffer file @@ -615,23 +615,23 @@ sub sysread { my $metaInterval = ${*$self}{'metaInterval'}; my $metaPointer = ${*$self}{'metaPointer'}; - # handle instream metadata for shoutcast/icecast + # handle instream metadata for shoutcast/icecast if ($metaInterval) { if ($metaPointer == $metaInterval) { # don't do anything if we can't read yet $self->readMetaData() || return undef; - - $metaPointer = ${*$self}{'metaPointer'} = 0; + + $metaPointer = ${*$self}{'metaPointer'} = 0; } elsif ($metaPointer > $metaInterval) { main::DEBUGLOG && $log->debug("The shoutcast metadata overshot the interval."); } - + if ($metaPointer + $chunkSize > $metaInterval) { - $chunkSize = $metaInterval - $metaPointer; + $chunkSize = $metaInterval - $metaPointer; #$log->debug("Reduced chunksize to $chunkSize for metadata"); - } + } } my $readLength; @@ -723,12 +723,6 @@ sub parseDirectHeaders { $startOffset = $1; $rangeLength = $2; } - - # mp3tunes metadata, this is a bit of hack but creating - # an mp3tunes protocol handler is overkill - elsif ( $url =~ /mp3tunes\.com/ && $header =~ /^X-Locker-Info:\s*(.+)/i ) { - Slim::Plugin::MP3tunes::Plugin->setLockerInfo( $client, $url, $1 ); - } } # Content-Range: has predecence over Content-Length: @@ -799,7 +793,7 @@ sub parseHeaders { # we should not parse anything before we have reached target return if ${*$self}{'redirect'} = $redir; - + if ($contentType) { if (($contentType =~ /text/i) && !($contentType =~ /text\/xml/i)) { # webservers often lie about playlists. This will @@ -992,15 +986,9 @@ sub scanUrl { Slim::Utils::Scanner::Remote->scanURL($url, $args); } -# Allow mp3tunes tracks to be scrobbled sub audioScrobblerSource { my ( $class, $client, $url ) = @_; - if ( $url =~ /mp3tunes\.com/ ) { - # Scrobble mp3tunes as 'chosen by user' content - return 'P'; - } - # R (radio source) return 'R'; } diff --git a/Slim/Player/Protocols/MMS.pm b/Slim/Player/Protocols/MMS.pm index 29bd58e92c3..5b27e793294 100644 --- a/Slim/Player/Protocols/MMS.pm +++ b/Slim/Player/Protocols/MMS.pm @@ -46,7 +46,7 @@ sub new { my $url = $args->{'url'}; my $client = $args->{'client'}; - + my $self = $class->SUPER::new($args); if (defined($self)) { @@ -59,7 +59,7 @@ sub new { sub getStreamBitrate { my ($self, $maxRate) = @_; - + return Slim::Player::Song::guessBitrateFromFormat(${*$self}{'contentType'}, $maxRate); } @@ -72,7 +72,7 @@ sub contentType { sub randomGUID { return $guid if $guid; - + $guid = ''; for my $digit (0...31) { @@ -81,7 +81,7 @@ sub randomGUID { $guid .= '-'; } - + $guid .= sprintf('%x', int(rand(16))); } @@ -90,7 +90,7 @@ sub randomGUID { sub canDirectStream { my ($class, $client, $url, $inType) = @_; - + # When synced, we don't direct stream so that the server can proxy a single # stream for all players if ( $client->isSynced(1) ) { @@ -113,14 +113,14 @@ sub canDirectStream { # Most WM streaming stations also stream via HTTP. The requestString class # method is invoked by the direct streaming code to obtain a request string # to send to a WM streaming server. We construct a HTTP request string and -# cross our fingers. +# cross our fingers. sub requestString { my $classOrSelf = shift; my $client = shift; my $url = shift; my $post = shift; # not used my $seekdata = shift || {}; - + main::DEBUGLOG && $log->debug($url); my ($server, $port, $path, $user, $password, $proxied) = Slim::Utils::Misc::crackURL($url); @@ -137,29 +137,29 @@ sub requestString { "Host: $host", "Pragma: xClientGUID={" . randomGUID() . "}", ); - + my $song = $client->streamingSong(); my $streamNum = 1; my $metadata; my $scanData; - + if ($song && ($scanData = $song->scanData()) && ($scanData = $scanData->{$url})) { main::INFOLOG && $log->info("Getting scanData from song"); $streamNum = $scanData->{'streamNum'} if defined $scanData->{'streamNum'}; $metadata = $scanData->{'metadata'}; } - + # Handle our metadata if ( $metadata ) { setMetadata( $client, $url, $metadata, $streamNum ); } - + my $newtime = $seekdata->{timeOffset}; - + my $context = $newtime ? 4 : 2; my $streamtime = $newtime ? $newtime * 1000 : 0; - - # Does the song include a metadata stream (Sirius)? + + # Does the song include a metadata stream? my $streamCount = 1; my $metadataStream = ''; if ( $song->wmaMetadataStream() ) { @@ -177,7 +177,7 @@ sub requestString { "Pragma: stream-switch-count=$streamCount", "Pragma: stream-switch-entry=ffff:" . $streamNum . ":0 " . $metadataStream, ); - + # Fix progress bar if seeking if ( $newtime ) { $client->playingSong()->startOffset($newtime); @@ -198,7 +198,7 @@ sub getFormatForURL { sub parseHeaders { my $self = shift; - + my ($title, $bitrate, $metaint, $redir, $contentType, $length, $body) = $self->parseDirectHeaders($self->client, $self->url, @_); ${*$self}{'contentType'} = $contentType if $contentType; @@ -213,9 +213,9 @@ sub parseHeaders { sub getMMSStreamingParameters { my ($class, $song, $url) = @_; - + my ($chunked, $audioStream, $metadataStream) = (1, 1, $song->wmaMetadataStream()); - + # Bugs 5631, 7762 # Check WMA metadata to see if this remote stream is being served from a # Windows Media server or a normal HTTP server. WM servers will use MMS chunking @@ -231,13 +231,13 @@ sub getMMSStreamingParameters { } } } - + $audioStream = $streamScanData->{'streamNum'} if defined $streamScanData->{'streamNum'}; } } - + main::DEBUGLOG && $log->is_debug && $log->debug("chunked=$chunked, audio=$audioStream, metadata=", (defined $metadataStream ? $metadataStream : 'undef')); - + return ($chunked, $audioStream, $metadataStream); } @@ -246,82 +246,76 @@ my @WMA_ASF_COMMAND_MEDIA_OBJECT_GUID = (0x59, 0xda, 0xcf, 0xc0, 0x59, 0xe6, 0x1 sub metadataGuids { my $client = shift; - + my @guids = (); - + if ($client == $client->master()) { push @guids, @WMA_ASF_COMMAND_MEDIA_OBJECT_GUID; } - + return @guids; } # This is a horrible hack to handle metadata sub handlesStreamHeaders { my ($class, $client) = @_; - + my $controller = $client->controller()->songStreamController(); - + # let the normal direct-streaming code in Slim::Player::Squeezebox2 handle things return 0 if $controller->isDirect(); - + # tell player to continue and send us metadata $client->sendContCommand(0, 0, metadataGuids($client)); - + return 1; } sub parseDirectHeaders { my ( $class, $client, $url, @headers ) = @_; - + my $isDebug = $log->is_debug; - + my ($title, $bitrate, $metaint, $redir, $contentType, $length, $body); - + foreach my $header (@headers) { - + $isDebug && $log->debug("header-ds: $header"); if ($header =~ /^Location:\s*(.*)/i) { $redir = $1; } - + elsif ($header =~ /^Content-Type:\s*(.*)/i) { $contentType = $1; } - + elsif ($header =~ /^Content-Length:\s*(.*)/i) { $length = $1; } - - # mp3tunes metadata, this is a bit of hack but creating - # an mp3tunes protocol handler is overkill - elsif ( $url =~ /mp3tunes\.com/ && $header =~ /^X-Locker-Info:\s*(.+)/i ) { - Slim::Plugin::MP3tunes::Plugin->setLockerInfo( $client, $url, $1 ); - } } $contentType = Slim::Music::Info::mimeToType($contentType); - + return ($title, $bitrate, $metaint, $redir, $contentType, $length, $body); } sub parseMetadata { my ( $class, $client, $song, $metadata ) = @_; - + my $guid; map { $guid .= $_ } unpack( 'H*', substr $metadata, 0, 16 ); - + if ( $guid eq '59dacfc059e611d0a3ac00a0c90348f6' ) { # Strip first 16 bytes of metadata (GUID) substr $metadata, 0, 16, ''; - + # Next 8 bytes is the length field. First byte is used to # indicate if this is a partial or final packet my $status = unpack 'C', substr( $metadata, 0, 8, '' ); - + my $md = $song->wmaMetaData() || ''; - + # Buffer partial packets if ( $status == META_STATUS_PARTIAL ) { $md .= $metadata; @@ -329,26 +323,26 @@ sub parseMetadata { main::DEBUGLOG && $log->is_debug && $log->debug( "ASF_Command_Media: Buffered partial packet, len " . length($metadata) ); return; } - elsif ( $status == META_STATUS_FINAL ) { + elsif ( $status == META_STATUS_FINAL ) { # Prepend previous chunks, if any $metadata = $md . $metadata; $song->wmaMetaData(undef); - + # Strip first byte if it is a length byte my $len = unpack 'C', $metadata; if ( $len == length($metadata) - 1 ) { substr $metadata, 0, 1, ''; } - + # WMA Metadata is UTF-16LE $metadata = eval { Encode::decode( 'UTF-16LE', $metadata ) }; if ( $@ ) { main::DEBUGLOG && $log->is_debug && $log->debug( "Decoding of WMA metadata failed: $@" ); return; } - + main::DEBUGLOG && $log->is_debug && $log->debug( "ASF_Command_Media: $metadata" ); - + # See if there is a parser for this stream my $url = Slim::Player::Playlist::url($client); my $parser = Slim::Formats::RemoteMetadata->getParserFor( $url ); @@ -356,7 +350,7 @@ sub parseMetadata { if ( main::DEBUGLOG && $log->is_debug ) { $log->debug( 'Trying metadata parser ' . Slim::Utils::PerlRunTime::realNameForCodeRef($parser) ); } - + my $handled = eval { $parser->( $client, $url, $metadata ) }; if ( $@ ) { my $name = main::DEBUGLOG ? Slim::Utils::PerlRunTime::realNameForCodeRef($parser) : 'unk'; @@ -364,12 +358,12 @@ sub parseMetadata { } return if $handled; } - + # See if the metadata matches a common format used by the SAM broadcaster # http://www.spacialaudio.com # URI-escaped query string terminated by a null # This format is used by RadioIO's WMA streams and some other providers - + if ( !$song->pluginData('wmaHasData') && $metadata =~ /CAPTION\0([^\0]+)/i ) { # use CAPTION formatted metadata unless we also have query-string metadata my $cb = sub { @@ -378,7 +372,7 @@ sub parseMetadata { } ); Slim::Music::Info::setCurrentTitle($url, $1, $client); }; - + # Delay metadata according to buffer size if we already have metadata if ( $song->pluginData('wmaMeta') ) { Slim::Music::Info::setDelayedCallback( $client, $cb, 'output-only' ); @@ -386,29 +380,29 @@ sub parseMetadata { else { $cb->(); } - + main::DEBUGLOG && $log->is_debug && $log->debug('Parsed WMA metadata from CAPTION string'); } elsif ( $metadata =~ /(artist=[^\0]+)/i ) { require URI::QueryParam; my $uri = URI->new( '?' . $1 ); my $meta = $uri->query_form_hash; - + # Make sure query params are lowercase for my $k ( keys %{$meta} ) { if ( $k ne lc($k) ) { $meta->{ lc($k) } = delete $meta->{$k}; } - } - + } + main::DEBUGLOG && $log->is_debug && $log->debug('Parsed WMA metadata from artist-style query string'); - + my $cb = sub { $song->pluginData( wmaMeta => $meta ); $song->pluginData( wmaHasData => 1 ); Slim::Music::Info::setCurrentTitle($url, $meta->{title}, $client) if $meta->{title}; }; - + # Delay metadata according to buffer size if we already have metadata if ( $song->pluginData('wmaHasData') ) { Slim::Music::Info::setDelayedCallback( $client, $cb, 'output-only' ); @@ -417,24 +411,24 @@ sub parseMetadata { $cb->(); } } - + # type=SONG format used by KFOG elsif ( $metadata =~ /(type=SONG[^\0]+)/ ) { require URI::QueryParam; my $uri = URI->new( '?' . $1 ); my $meta = $uri->query_form_hash; - + main::DEBUGLOG && $log->is_debug && $log->debug('Parsed WMA metadata from type=SONG query string'); - + $meta->{artist} = delete $meta->{currentArtist}; $meta->{title} = delete $meta->{currentSong}; - + my $cb = sub { $song->pluginData( wmaMeta => $meta ); $song->pluginData( wmaHasData => 1 ); Slim::Music::Info::setCurrentTitle($url, $meta->{title}, $client) if $meta->{title}; }; - + # Delay metadata according to buffer size if we already have metadata if ( $song->pluginData('wmaHasData') ) { Slim::Music::Info::setDelayedCallback( $client, $cb, 'output-only' ); @@ -444,17 +438,17 @@ sub parseMetadata { } } } - + # If there is no parser, we ignore ASF_Command_Media return; } - + return; } sub setMetadata { my ( $client, $url, $wma, $streamNumber ) = @_; - + # Bitrate method 1: from parseDirectBody, we have the whole WMA object if ( $streamNumber && ref $wma->{info}->{streams} ) { @@ -476,22 +470,22 @@ sub setMetadata { } } } - + # Set duration and progress bar if available and this is not a broadcast stream if ( my $ms = $wma->{info}->{song_length_ms} ) { $client->streamingProgressBar( { url => $url, duration => int($ms / 1000), } ); - + if ( my $song = $client->streamingSong() ) { $song->duration($ms / 1000); } } - + # Set title if available if ( my $title = $wma->{tags}->{Title} ) { - + # Ignore title metadata for Rhapsody tracks if ( $url !~ /^rhap/ ) { @@ -500,7 +494,7 @@ sub setMetadata { for my $everybuddy ( $client->syncGroupActiveMembers()) { $everybuddy->update(); } - + main::INFOLOG && $log->info("Setting title to '$title' from WMA metadata"); } } @@ -514,9 +508,9 @@ sub scanUrl { sub canSeek { my ( $class, $client, $song ) = @_; - + $client = $client->master(); - + # Remote stream must be seekable my ($headers, $scanData); if ( ($scanData = $song->scanData()) @@ -530,13 +524,13 @@ sub canSeek { } } } - + return 0; } sub canSeekError { my ( $class, $client, $song ) = @_; - + my ($metadata, $scanData); if ( ($scanData = $song->scanData()) && ($scanData = $scanData->{$song->currentTrack()->url}) @@ -546,13 +540,13 @@ sub canSeekError { return 'SEEK_ERROR_LIVE'; } } - + return 'SEEK_ERROR_MMS'; } sub getSeekData { my ( $class, $client, $song, $newtime ) = @_; - + # Determine byte offset and song length in bytes my ($metadata, $scanData); @@ -561,23 +555,23 @@ sub getSeekData { && ($metadata = $scanData->{metadata}) ) { my $bitrate = $song->bitrate() || return; - + $bitrate /= 1000; - + main::DEBUGLOG && $log->debug( "Trying to seek $newtime seconds into $bitrate kbps stream" ); return { sourceStreamOffset => ( ( $bitrate * 1000 ) / 8 ) * $newtime, timeOffset => $newtime, - }; + }; } - + return undef; } sub getMetadataFor { my $class = shift; - + Slim::Player::Protocols::HTTP->getMetadataFor( @_ ); } diff --git a/Slim/Player/Squeezebox2.pm b/Slim/Player/Squeezebox2.pm index 2773f684f60..83fd4045bee 100644 --- a/Slim/Player/Squeezebox2.pm +++ b/Slim/Player/Squeezebox2.pm @@ -449,7 +449,7 @@ sub songElapsedSeconds { $songElapsed = $elapsedSeconds; } - # If we are disconnected and the only player or not master, elapsed shall not progress + # If we are disconnected and the only player or not master, elapsed shall not progress # anymore otherwise, extrapolate value to not confuse other players if ($client->isPlaying(1) && (!$client->disconnected() || ($client->isSynced() && Slim::Player::Sync::isMaster($client)))) { my $timeDiff = Time::HiRes::time() - $client->jiffiesToTimestamp($jiffies); @@ -667,7 +667,7 @@ sub directHeaders { } elsif ($client->contentTypeSupported($controller->song->streamformat)) { - # If we redirected (Live365), update the original URL with the metadata from the real URL + # If we redirected, update the original URL with the metadata from the real URL if ( my $oldURL = delete $redirects->{ $url } ) { $controller->song->bitrate($bitrate) if $bitrate; diff --git a/Slim/Plugin/Favorites/OpmlFavorites.pm b/Slim/Plugin/Favorites/OpmlFavorites.pm index 477df0964c2..59564201549 100644 --- a/Slim/Plugin/Favorites/OpmlFavorites.pm +++ b/Slim/Plugin/Favorites/OpmlFavorites.pm @@ -316,7 +316,7 @@ sub add { $url = $url->url; } - $url =~ s/\?sessionid.+//i; # Bug 3362, ignore sessionID's within URLs (Live365) + $url =~ s/\?sessionid.+//i; # Bug 3362, ignore sessionID's within URLs if ( main::INFOLOG && $log->is_info ) { $log->info(sprintf("url: %s title: %s type: %s parser: %s icon: %s", $url, $title, $type, $parser, $icon)); @@ -368,7 +368,7 @@ sub findUrl { my $class = shift; my $url = shift; - $url =~ s/\?sessionid.+//i; # Bug 3362, ignore sessionID's within URLs (Live365) + $url =~ s/\?sessionid.+//i; # Bug 3362, ignore sessionID's within URLs my $index = $class->{'url-index'}->{ $url }; @@ -392,7 +392,7 @@ sub deleteUrl { $url = $url->url; } - $url =~ s/\?sessionid.+//i; # Bug 3362, ignore sessionID's within URLs (Live365) + $url =~ s/\?sessionid.+//i; # Bug 3362, ignore sessionID's within URLs if (exists $class->{'url-index'}->{ $url }) {