Compare commits

..

No commits in common. "b4ca16caf8e17fad033412fdffb67b21db70eb4f" and "19820db6d01d0f56808ea9e7eefdacb9a8601f5f" have entirely different histories.

3 changed files with 6 additions and 19 deletions

View file

@ -588,20 +588,10 @@ async fn main() {
} }
UrlTarget::Playlist { id } => { UrlTarget::Playlist { id } => {
if music { if music {
let mut playlist = rp.query().music_playlist(&id).await.unwrap(); let playlist = rp.query().music_playlist(&id).await.unwrap();
playlist
.tracks
.extend_limit(rp.query(), limit)
.await
.unwrap();
print_data(&playlist, format, pretty); print_data(&playlist, format, pretty);
} else { } else {
let mut playlist = rp.query().playlist(&id).await.unwrap(); let playlist = rp.query().playlist(&id).await.unwrap();
playlist
.videos
.extend_limit(rp.query(), limit)
.await
.unwrap();
print_data(&playlist, format, pretty); print_data(&playlist, format, pretty);
} }
} }

View file

@ -136,11 +136,11 @@ impl MapResponse<Paginator<MusicItem>> for response::MusicContinuation {
let mut continuations = Vec::new(); let mut continuations = Vec::new();
match self.continuation_contents { match self.continuation_contents {
Some(response::music_item::ContinuationContents::MusicShelfContinuation(mut shelf)) => { response::music_item::ContinuationContents::MusicShelfContinuation(mut shelf) => {
mapper.map_response(shelf.contents); mapper.map_response(shelf.contents);
continuations.append(&mut shelf.continuations); continuations.append(&mut shelf.continuations);
} }
Some(response::music_item::ContinuationContents::SectionListContinuation(contents)) => { response::music_item::ContinuationContents::SectionListContinuation(contents) => {
for c in contents.contents { for c in contents.contents {
match c { match c {
response::music_item::ItemSection::MusicShelfRenderer(mut shelf) => { response::music_item::ItemSection::MusicShelfRenderer(mut shelf) => {
@ -154,9 +154,7 @@ impl MapResponse<Paginator<MusicItem>> for response::MusicContinuation {
} }
} }
} }
Some(response::music_item::ContinuationContents::PlaylistPanelContinuation( response::music_item::ContinuationContents::PlaylistPanelContinuation(mut panel) => {
mut panel,
)) => {
continuations.append(&mut panel.continuations); continuations.append(&mut panel.continuations);
mapper.add_warnings(&mut panel.contents.warnings); mapper.add_warnings(&mut panel.contents.warnings);
panel.contents.c.into_iter().for_each(|item| { panel.contents.c.into_iter().for_each(|item| {
@ -165,7 +163,6 @@ impl MapResponse<Paginator<MusicItem>> for response::MusicContinuation {
} }
}); });
} }
None => {}
} }
let map_res = mapper.items(); let map_res = mapper.items();

View file

@ -298,7 +298,7 @@ impl From<MusicThumbnailRenderer> for Vec<model::Thumbnail> {
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub(crate) struct MusicContinuation { pub(crate) struct MusicContinuation {
pub continuation_contents: Option<ContinuationContents>, pub continuation_contents: ContinuationContents,
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]