improve CLI error semantics and soundcloud canonicalization

Auto-upgrade outdated configs on startup, add actionable SSL verification hints in rip error paths, and harden SoundCloud search/metadata with canonical URL handling and richer source IDs.
This commit is contained in:
2026-04-20 15:16:59 +02:00
parent 0748d5a325
commit 0ba8faa943
9 changed files with 502 additions and 106 deletions

View File

@@ -49,7 +49,7 @@ func Parse(raw string) *ParsedURL {
return parseTidal(raw, parts)
case isDeezerHost(host):
return parseDeezer(raw, parts)
case host == "soundcloud.com":
case isSoundcloudHost(host):
return parseSoundcloud(raw, parts)
default:
return nil
@@ -129,7 +129,7 @@ func parseDeezer(raw string, parts []string) *ParsedURL {
}
func parseSoundcloud(raw string, parts []string) *ParsedURL {
if len(parts) < 2 {
if len(parts) < 1 {
return nil
}
@@ -172,6 +172,10 @@ func isDeezerHost(host string) bool {
return host == "deezer.com"
}
func isSoundcloudHost(host string) bool {
return host == "soundcloud.com" || strings.HasSuffix(host, ".soundcloud.com") || host == "on.soundcloud.com"
}
func isSupportedMedia(mediaType string) bool {
switch mediaType {
case "album", "track", "playlist", "artist", "label", "video":