[Slim-Checkins] r33942 - /7.7/trunk/server/Slim/Plugin/RadioTime/Metadata.pm
[email protected] Thu, 19 Apr 2012 12:37:23 -0000
| Newsgroups | gmane.music.equipment.slimdevices.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mherger
Date: Thu Apr 19 05:37:23 2012
New Revision: 33942
URL: http://svn.slimdevices.com/slim?rev=33942&view=rev
Log:
Bug: n/a
Description: no need to deal with the $song object unless we have a station logo. Store the same in the client object as well, for simpler access.
Modified:
7.7/trunk/server/Slim/Plugin/RadioTime/Metadata.pm
Modified: 7.7/trunk/server/Slim/Plugin/RadioTime/Metadata.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Plugin/RadioTime/Metadata.pm?rev=33942&r1=33941&r2=33942&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Plugin/RadioTime/Metadata.pm (original)
+++ 7.7/trunk/server/Slim/Plugin/RadioTime/Metadata.pm Thu Apr 19 05:37:23 2012
@@ -345,16 +345,17 @@
main::DEBUGLOG && $log->debug( 'Getting TuneIn artwork based on metadata:', Data::Dump::dump($track) );
# keep track of the station logo in case we don't get track artwork
- if ( my $song = $client->playingSong() ) {
- # [ps] => podcast or station
- # t => Thumbnail
- # q => sQuare
- # g => Giant
- # d => meDium
- if ( !$song->pluginData('stationLogo') && $track->{cover} && $track->{cover} =~ m{/[ps]\d+[tqgd]\.(?:jpg|jpeg|png|gif)$}i ) {
+ # [ps] => podcast or station
+ # t => Thumbnail
+ # q => sQuare
+ # g => Giant
+ # d => meDium
+ if ( $track->{cover} && $track->{cover} =~ m{/[ps]\d+[tqgd]\.(?:jpg|jpeg|png|gif)$}i && (my $song = $client->playingSong()) ) {
+ if ( !$song->pluginData('stationLogo') ) {
main::DEBUGLOG && $log->debug( 'Storing default station artwork: ' . $track->{cover} );
$song->pluginData( stationLogo => $track->{cover} );
+ $client->pluginData( stationLogo => $track->{cover} );
}
}