refactor: use a better API to download playlists with more than 40 tracks

This commit is contained in:
Mathis Maquenne
2025-04-26 00:01:27 +02:00
parent d0599f654e
commit ddc8240da8
10 changed files with 180 additions and 85 deletions
+1 -5
View File
@@ -39,7 +39,7 @@ func initConfig() {
if _, err := os.Stat(path); os.IsNotExist(err) {
fmt.Printf("Config file not found, creating one at %s\n", path)
content := []byte("arl_cookie = ''\nlicense_token = ''\nsecret_key = ''\niv = '0001020304050607'\n")
content := []byte("arl_cookie = ''\nsecret_key = ''\niv = '0001020304050607'\n")
if err := os.WriteFile(path, content, 0644); err != nil {
fmt.Fprintf(os.Stderr, "Error: could not create config file: %v\n", err)
os.Exit(1)
@@ -63,10 +63,6 @@ func initConfig() {
os.Exit(1)
}
if cfg.LicenseToken == "" {
fmt.Fprintln(os.Stderr, "Error: license_token is not set in config file")
os.Exit(1)
}
if cfg.SecretKey == "" {
fmt.Fprintln(os.Stderr, "Error: secret_key is not set in config file")
os.Exit(1)