feat: add related playlists
This commit is contained in:
parent
dfd33d5e9b
commit
8af1ae303d
11 changed files with 4712 additions and 16 deletions
|
|
@ -40,6 +40,7 @@ pub async fn download_testfiles(project_root: &Path) {
|
|||
|
||||
music_playlist(&testfiles).await;
|
||||
music_playlist_cont(&testfiles).await;
|
||||
music_playlist_related(&testfiles).await;
|
||||
music_album(&testfiles).await;
|
||||
music_search(&testfiles).await;
|
||||
music_search_tracks(&testfiles).await;
|
||||
|
|
@ -535,6 +536,30 @@ async fn music_playlist_cont(testfiles: &Path) {
|
|||
playlist.tracks.next(&rp.query()).await.unwrap().unwrap();
|
||||
}
|
||||
|
||||
async fn music_playlist_related(testfiles: &Path) {
|
||||
let mut json_path = testfiles.to_path_buf();
|
||||
json_path.push("music_playlist");
|
||||
json_path.push("playlist_related.json");
|
||||
if json_path.exists() {
|
||||
return;
|
||||
}
|
||||
|
||||
let rp = RustyPipe::new();
|
||||
let playlist = rp
|
||||
.query()
|
||||
.music_playlist("PL5dDx681T4bR7ZF1IuWzOv1omlRbE7PiJ")
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let rp = rp_testfile(&json_path);
|
||||
playlist
|
||||
.related_playlists
|
||||
.next(&rp.query())
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
async fn music_album(testfiles: &Path) {
|
||||
for (name, id) in [
|
||||
("one_artist", "MPREb_nlBWQROfvjo"),
|
||||
|
|
|
|||
Reference in a new issue