File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -561,6 +561,19 @@ void SpotifyPlayer::refreshCurrentSong(CurrentlyPlaying currentlyPlaying)
561561 // const char* artist =
562562 spLogI (LOGTAG_MULTITASK, " Refreshing current song. SpotifyPlayer::refreshCurrentSong(CurrentlyPlaying currentlyPlaying)" );
563563
564+ // If not a track or episode, update the UI accordingly and indicate music isn't available
565+ if ((!currentlyPlaying.currentlyPlayingType == SpotifyPlayingType::track)
566+ && (!currentlyPlaying.currentlyPlayingType == SpotifyPlayingType::episode))
567+ {
568+ spLogI (LOGTAG_GENERAL, " _isMusicAvailable set to false. currentlyPlayingType is not a supported type." );
569+ _isMusicAvailable = false ;
570+ // force a refresh to get the waiting message
571+ postScuiMessage (SCUIMessageType::UM_MARK_DIRTY,
572+ " " ,
573+ true );
574+ return ;
575+ }
576+
564577 if (xSemaphoreTake (_xSemaphoreDataCopy, portMAX_DELAY))
565578 {
566579 // copy currentlyPlaying over for use
You can’t perform that action at this time.
0 commit comments