Added tracking/capturing/restoration of audio playback state and position.

This commit is contained in:
2026-08-08 16:37:55 -04:00
parent c262ee4caa
commit 0942e3e5ad
11 changed files with 92 additions and 15 deletions

View File

@@ -50,6 +50,17 @@ public partial class PlayingSongViewModel : ViewModelBase
_audioBitmapImageCache = audioBitmapImageCache;
_dispatcherQueue = DispatcherQueue.GetForCurrentThread();
TryRestore();
}
private void TryRestore()
{
if (_audioPlayer.PlayingSong is null)
return;
Song = _audioPlayer.PlayingSong.Song;
Task.Run(UpdateImage);
}
private void OnAudioPlayerPlayingSongChanged(object? sender, PlayingSongChangedEventArgs e)