feat: add track details, radios
This commit is contained in:
parent
556575f5ff
commit
e4046aef00
22 changed files with 19960 additions and 30 deletions
|
|
@ -6,7 +6,7 @@ use crate::param::ContinuationEndpoint;
|
|||
use crate::serializer::MapResult;
|
||||
use crate::util::TryRemove;
|
||||
|
||||
use super::response::music_item::MusicListMapper;
|
||||
use super::response::music_item::{map_queue_item, MusicListMapper, PlaylistPanelVideo};
|
||||
use super::{response, ClientType, MapResponse, QContinuation, RustyPipeQuery};
|
||||
|
||||
impl RustyPipeQuery {
|
||||
|
|
@ -152,6 +152,15 @@ impl MapResponse<Paginator<MusicItem>> for response::MusicContinuation {
|
|||
}
|
||||
}
|
||||
}
|
||||
response::music_item::ContinuationContents::PlaylistPanelContinuation(mut panel) => {
|
||||
continuations.append(&mut panel.continuations);
|
||||
mapper.add_warnings(&mut panel.contents.warnings);
|
||||
panel.contents.c.into_iter().for_each(|item| {
|
||||
if let PlaylistPanelVideo::PlaylistPanelVideoRenderer(item) = item {
|
||||
mapper.add_item(MusicItem::Track(map_queue_item(item, lang)))
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let map_res = mapper.items();
|
||||
|
|
@ -355,6 +364,7 @@ mod tests {
|
|||
#[rstest]
|
||||
#[case("playlist_tracks", "music_playlist/playlist_cont")]
|
||||
#[case("search_tracks", "music_search/tracks_cont")]
|
||||
#[case("radio_tracks", "music_details/radio_cont")]
|
||||
fn map_continuation_tracks(#[case] name: &str, #[case] path: &str) {
|
||||
let filename = format!("testfiles/{}.json", path);
|
||||
let json_path = Path::new(&filename);
|
||||
|
|
|
|||
Reference in a new issue