feat(local-library): implement playback context tracking

Add proper context tracking for Local Library playback so the stack
icon shows correctly when playing from Local Library.

Changes:
- Add 'local_library' to ContextType enum (frontend and backend)
- Add 'Local Library' display label in context info
- Import setPlaybackContext in LocalLibraryView
- Call setPlaybackContext when playing tracks from Local Library
  - For album view: context is the album with album title
  - For tracks view: context is "Local Tracks"
- Track IDs and position are properly set for context navigation

Fixes issue where Local Library playback showed stale Qobuz context.

cc
This commit is contained in:
vicrodh committed 2026-01-19 18:17:04 -06:00
1 parent 873dcee10e
commit f2c3e8aedd
3 files changed
+32 -2

No files matched your search

+2
View File
@@ -22,6 +22,7 @@ pub enum ContextType {
ArtistTop,
HomeList,
Favorites,
LocalLibrary,
}
/// Source of the content (Qobuz or Local Library)
@@ -120,6 +121,7 @@ impl PlaybackContext {
ContextType::ArtistTop => "Artist Top Songs",
ContextType::HomeList => "Home List",
ContextType::Favorites => "Favorites",
ContextType::LocalLibrary => "Local Library",
};
format!("{} · {}", type_str, self.label)
}