PDA

View Full Version : Duplicate text on squeezeplay display



Triode
2010-02-13, 10:34
I'd like to propose the following:

--- Slim/Control/Queries.pm (revision 30145)
+++ Slim/Control/Queries.pm (working copy)
@@ -4832,7 +4832,7 @@

# Special case for Internet Radio streams, if the track is remote,
has no duration,
# has title metadata, and has no album metadata, display the station
title as line 1 of the text
- if ( $songData->{remote_title} && !$album && $track->remote &&
!$track->secs ) {
+ if ( $songData->{remote_title} && $songData->{remote_title} ne
$title && !$album && $track->remote && !$track->secs ) {
push @secondLine, $songData->{remote_title};
$album = $songData->{remote_title};
$request->addResult('current_title');

This avoids repeating the same text on 2 lines of the now playing display
for remote streams where the remote_title is the same as the title. This is
seen at present with BBC WMA streams and I am sure its seen with others. It
also avoids a custom metadata parser from trying to set the album line to
nothing as this code currently overrides what a metadata handler responds
with if its an empty string for album.

Any objections? (I don't really understand why we ignore metadata which is
an empty string, but it looks odd anyway to have the same text repeated)

bklaas
2010-02-13, 12:09
Thumbs up from me, Triode.

#!/ben