fix: add FavQ and TopQ context types to playback context

The ContextType enum and v2_set_playback_context match were missing
fav_q and top_q variants, causing an "Invalid context type" error that
blocked all playback from FavQ and TopQ views. Also wrap
setPlaybackContext calls in try/catch so context errors don't prevent
track playback.

Fixes #140
This commit is contained in:
vicrodh committed 2026-03-01 08:58:45 -06:00
1 parent ad866b191e
commit 2095e5fce3
4 files changed
+30 -16

No files matched your search

+2
View File
@@ -8926,6 +8926,8 @@ pub async fn v2_set_playback_context(
"home_list" => ContextType::HomeList,
"daily_q" => ContextType::DailyQ,
"weekly_q" => ContextType::WeeklyQ,
"fav_q" => ContextType::FavQ,
"top_q" => ContextType::TopQ,
"favorites" => ContextType::Favorites,
"local_library" => ContextType::LocalLibrary,
"radio" => ContextType::Radio,
+4
View File
@@ -24,6 +24,8 @@ pub enum ContextType {
HomeList,
DailyQ,
WeeklyQ,
FavQ,
TopQ,
Favorites,
LocalLibrary,
Radio,
@@ -129,6 +131,8 @@ impl PlaybackContext {
ContextType::HomeList => "Home List",
ContextType::DailyQ => "DailyQ",
ContextType::WeeklyQ => "WeeklyQ",
ContextType::FavQ => "FavQ",
ContextType::TopQ => "TopQ",
ContextType::Favorites => "Favorites",
ContextType::LocalLibrary => "Local Library",
ContextType::Radio => "Radio",