use a zero waveform image with single horizontal line when none exists

This commit is contained in:
Drew Weymouth
2025-08-01 17:52:05 -07:00
parent 8078b7082f
commit 8e3ec5e11b
3 changed files with 20 additions and 1 deletions
+9
View File
@@ -190,6 +190,15 @@ func (p *PlaybackManager) handleWaveformImageSongChange(item mediaprovider.Media
}
}
}
if item == nil || item.Metadata().Type != mediaprovider.MediaItemTypeTrack {
// set a zero waveform image when we're not playing anything
// or playing a media type we can't derive a waveform from (e.g. radio)
img := NewWaveformImage()
for _, cb := range p.onWaveformImgUpdate {
cb(img)
}
}
}
func (p *PlaybackManager) ScanRemotePlayers(ctx context.Context, fastScan bool) {