feat(playlist): download private playlists with arl cookie

This commit is contained in:
Mathis Maquenne
2024-10-14 16:22:44 +02:00
parent d38a2c4f7b
commit 6d660e3f51
5 changed files with 29 additions and 4 deletions
+6
View File
@@ -71,6 +71,12 @@ func downloadContent(contentType string, args []string) {
fmt.Fprintf(os.Stderr, "Error: could not get playlist data: %v\n", err)
continue
}
if playlist.Data.Status == 1 && playlist.Data.CollabKey == "" {
fmt.Printf("\r[%d/%d] Getting data for playlist %s... FAILED\n", i+1, nArgs, id)
fmt.Fprintf(os.Stderr, "Error: playlist is private and no valid arl cookie was provided\n")
continue
}
resource = playlist
songs = playlist.GetSongs()
}