fix: add support for A/B-13 (2-column layout for music playlists/albums)
This commit is contained in:
parent
2fb210b363
commit
c402f463b4
14 changed files with 63535 additions and 89 deletions
|
|
@ -28,6 +28,10 @@ pub(crate) enum NavigationEndpoint {
|
|||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
Url { url_endpoint: UrlEndpoint },
|
||||
#[serde(rename_all = "camelCase")]
|
||||
WatchPlaylist {
|
||||
watch_playlist_endpoint: WatchPlaylistEndpoint,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
|
|
@ -54,6 +58,12 @@ pub(crate) struct BrowseEndpointWrap {
|
|||
pub browse_endpoint: BrowseEndpoint,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub(crate) struct WatchPlaylistEndpoint {
|
||||
pub playlist_id: String,
|
||||
}
|
||||
|
||||
impl<'de> Deserialize<'de> for BrowseEndpoint {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where
|
||||
|
|
@ -294,6 +304,12 @@ impl NavigationEndpoint {
|
|||
)
|
||||
}),
|
||||
NavigationEndpoint::Url { .. } => None,
|
||||
NavigationEndpoint::WatchPlaylist {
|
||||
watch_playlist_endpoint,
|
||||
} => Some(MusicPage {
|
||||
id: watch_playlist_endpoint.playlist_id,
|
||||
typ: MusicPageType::Playlist,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue