[Slim-Checkins] r8815 -
/trunk/server/Plugins/Live365/ProtocolHandler.pm
andy at svn.slimdevices.com
andy at svn.slimdevices.com
Sat Aug 5 07:46:37 PDT 2006
Author: andy
Date: Sat Aug 5 07:46:36 2006
New Revision: 8815
URL: http://svn.slimdevices.com?rev=8815&view=rev
Log:
Live365: Make sure playlist timer stops if the station has changed. Display track description if title is NONE (for ads)
Modified:
trunk/server/Plugins/Live365/ProtocolHandler.pm
Modified: trunk/server/Plugins/Live365/ProtocolHandler.pm
URL: http://svn.slimdevices.com/trunk/server/Plugins/Live365/ProtocolHandler.pm?rev=8815&r1=8814&r2=8815&view=diff
==============================================================================
--- trunk/server/Plugins/Live365/ProtocolHandler.pm (original)
+++ trunk/server/Plugins/Live365/ProtocolHandler.pm Sat Aug 5 07:46:36 2006
@@ -122,7 +122,7 @@
my $currentSong = Slim::Player::Playlist::url($client);
my $currentMode = Slim::Player::Source::playmode($client);
- return if ($currentSong !~ /^live365:/ || $currentMode ne 'play');
+ return if ($currentSong ne $url || $currentMode ne 'play');
# store the original title as a fallback, once.
${*$self}{live365_original_title} ||= Slim::Music::Info::getCurrentTitle( $client, $currentSong );
@@ -180,8 +180,14 @@
$nextRefresh = $nowPlaying->{Refresh}->{content} || 60;
my @titleComponents = ();
- if ($nowPlaying->{PlaylistEntry}->[0]->{Title}->{content}) {
- push @titleComponents, $nowPlaying->{PlaylistEntry}->[0]->{Title}->{content};
+ if ( my $title = $nowPlaying->{PlaylistEntry}->[0]->{Title}->{content} ) {
+ if ( $title eq 'NONE' ) {
+ # no title, it's probably an ad, so display the description
+ push @titleComponents, $nowPlaying->{PlaylistEntry}->[0]->{desc}->{content};
+ }
+ else {
+ push @titleComponents, $title;
+ }
}
if ($nowPlaying->{PlaylistEntry}->[0]->{Artist}->{content}) {
push @titleComponents, $nowPlaying->{PlaylistEntry}->[0]->{Artist}->{content};
@@ -215,7 +221,7 @@
my $currentSong = Slim::Player::Playlist::url($client);
my $currentMode = Slim::Player::Source::playmode($client);
- return if ($currentSong !~ /^live365:/ || $currentMode ne 'play');
+ return if ($currentSong ne $url || $currentMode ne 'play');
if ( $nextRefresh and $currentSong =~ /^live365:/ and $currentMode eq 'play' ) {
Slim::Utils::Timers::setTimer(
More information about the checkins
mailing list