feat(opendeck): preview and reroll radio from liked tracks
This commit is contained in:
1 parent
cc1176a160
commit
c911cb63e3
21 files changed
+1423
-70
No files matched your search
@@ -25,6 +25,8 @@ pub struct Snapshot {
|
||||
pub api_version: u16,
|
||||
#[serde(default, skip_serializing_if = "is_false")]
|
||||
pub spectrum_supported: bool,
|
||||
#[serde(default, skip_serializing_if = "is_false")]
|
||||
pub liked_radio_supported: bool,
|
||||
pub revision: u64,
|
||||
pub updated_at_ms: u64,
|
||||
pub role: Role,
|
||||
@@ -67,10 +69,19 @@ pub enum Repeat {
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
pub struct Radio {
|
||||
pub id: u64,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub request_id: Option<String>,
|
||||
pub state: RadioState,
|
||||
pub error: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
pub struct LikedRadioSeed {
|
||||
pub key: String,
|
||||
pub title: String,
|
||||
pub artist: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum RadioState {
|
||||
@@ -158,6 +169,15 @@ pub enum Command {
|
||||
ToggleShuffle,
|
||||
CycleRepeat,
|
||||
StartRadio,
|
||||
PickLikedRadioSeed {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
exclude: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
replace_request_id: Option<String>,
|
||||
},
|
||||
StartLikedRadio {
|
||||
seed_key: String,
|
||||
},
|
||||
SetLiked {
|
||||
track_key: String,
|
||||
liked: bool,
|
||||
@@ -195,6 +215,10 @@ pub enum ServerMessage {
|
||||
accepted: bool,
|
||||
error: Option<String>,
|
||||
},
|
||||
LikedRadioSeed {
|
||||
id: String,
|
||||
seed: LikedRadioSeed,
|
||||
},
|
||||
Artwork {
|
||||
id: String,
|
||||
artwork_id: String,
|
||||
|
||||
Reference in new issue
Block a user