mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
add CLI parity flags and expand provider support
This brings the Go CLI closer to upstream behavior with global flag handling and clearer resolve failures, while adding Tidal video downloads plus initial Deezer and SoundCloud no-account flows for broader end-to-end coverage.
This commit is contained in:
@@ -65,7 +65,7 @@ func Prepare(ctx context.Context, dl Downloader, folder string, albumMeta map[st
|
||||
}
|
||||
|
||||
if cfg.Embed && embedURL != "" {
|
||||
embedDir := filepath.Join(folder, "__artwork")
|
||||
embedDir := sessionEmbedDir(folder)
|
||||
if err := os.MkdirAll(embedDir, 0o755); err == nil {
|
||||
registerTempDir(embedDir)
|
||||
embedPath := filepath.Join(embedDir, embedFilename(embedURL))
|
||||
@@ -134,6 +134,11 @@ func embedFilename(url string) string {
|
||||
return fmt.Sprintf("cover%x.jpg", s[:8])
|
||||
}
|
||||
|
||||
func sessionEmbedDir(folder string) string {
|
||||
key := sha1.Sum([]byte(folder))
|
||||
return filepath.Join(os.TempDir(), "streamrip-go-artwork", fmt.Sprintf("%x", key[:8]))
|
||||
}
|
||||
|
||||
func stringAny(v any) string {
|
||||
s, _ := v.(string)
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user