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 } => {
if music {
let mut playlist = rp.query().music_playlist(&id).await.unwrap();
playlist
.tracks
.extend_limit(rp.query(), limit)
.await
.unwrap();
let playlist = rp.query().music_playlist(&id).await.unwrap();
print_data(&playlist, format, pretty);
} else {
let mut playlist = rp.query().playlist(&id).await.unwrap();
playlist
.videos
.extend_limit(rp.query(), limit)
.await
.unwrap();
let playlist = rp.query().playlist(&id).await.unwrap();
print_data(&playlist, format, pretty);
}
}

View file

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

View file

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