2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

99_sonos2mqttUtils.pm:extend Favorites msg1255802

git-svn-id: https://svn.fhem.de/fhem/trunk@26968 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Otto123 2023-01-05 21:52:27 +00:00
parent 25a63e30c8
commit 54ee68138b

View File

@ -343,7 +343,7 @@ if ($reading eq 'Input') {
my $currentTrack_TrackUri = ReadingsVal($name,'currentTrack_TrackUri',''); my $currentTrack_TrackUri = ReadingsVal($name,'currentTrack_TrackUri','');
return $currentTrack_TrackUri =~ 'x-rincon-stream' return $currentTrack_TrackUri =~ 'x-rincon-stream'
? 'LineIn': $currentTrack_TrackUri =~ 'spdif' ? 'LineIn': $currentTrack_TrackUri =~ 'spdif'
? 'TV' : ReadingsVal($name,'enqueuedMetadata_UpnpClass','') eq 'object.item.audioItem.audioBroadcast' ? 'TV' : ReadingsVal($name,'enqueuedMetadata_UpnpClass','') eq 'object.item.audioItem.audioBroadcast' or $currentTrack_TrackUri =~ 'x-rincon-mp3radio'
? 'Radio' : 'Playlist' ? 'Radio' : 'Playlist'
} }
} }
@ -365,7 +365,7 @@ my @out;
my $dec = encode($enc, decode_entities($_->{'Title'})); my $dec = encode($enc, decode_entities($_->{'Title'}));
$dec =~ s/\s/./g; $dec =~ s/\s/./g;
if ($reading eq 'Favorites') { if ($reading eq 'Favorites') {
if ( $_->{'TrackUri'} =~ /x-sonosapi-stream/) { if ( $_->{'TrackUri'} =~ /x-sonosapi-stream/ or $_->{'TrackUri'} =~ /x-sonosapi-radio/ or $_->{'TrackUri'} =~ /x-rincon-mp3radio/) {
push @out,$dec push @out,$dec
} }
} else {push @out,$dec} } else {push @out,$dec}