@@ -9,7 +9,7 @@ CapEventHandlers.PlaybackStatus = {
99 Buffering = " PLAYBACK_STATE_BUFFERING" ,
1010 Idle = " PLAYBACK_STATE_IDLE" ,
1111 Paused = " PLAYBACK_STATE_PAUSED" ,
12- Playing = " PLAYBACK_STATE_PLAYING"
12+ Playing = " PLAYBACK_STATE_PLAYING" ,
1313}
1414
1515function CapEventHandlers .handle_player_volume (device , new_volume , is_muted )
@@ -84,7 +84,12 @@ function CapEventHandlers.handle_playback_metadata_update(device, metadata_statu
8484 local is_linein = string.find (metadata_status_body .container .type , " linein" , 1 , true ) ~= nil
8585 local is_station = string.find (metadata_status_body .container .type , " station" , 1 , true ) ~= nil
8686 local is_show = string.find (metadata_status_body .container .type , " show" , 1 , true ) ~= nil
87- local is_radio_tracklist = string.find (metadata_status_body .container .type , " trackList.program" , 1 , true ) ~= nil
87+ local is_radio_tracklist = string.find (
88+ metadata_status_body .container .type ,
89+ " trackList.program" ,
90+ 1 ,
91+ true
92+ ) ~= nil
8893
8994 if is_linein then
9095 audio_track_data .title = metadata_status_body .container .name
@@ -101,8 +106,7 @@ function CapEventHandlers.handle_playback_metadata_update(device, metadata_statu
101106 if metadata_status_body .track then
102107 track_info = metadata_status_body .track
103108 elseif metadata_status_body .currentItem and metadata_status_body .currentItem .track then
104- track_info = metadata_status_body
105- .currentItem .track
109+ track_info = metadata_status_body .currentItem .track
106110 end
107111
108112 if track_info ~= nil then
0 commit comments