mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
harden deezer auth errors and mixed playlist preflight
This commit is contained in:
@@ -728,6 +728,20 @@ func (m *Main) ripPlaylist(ctx context.Context, p provider.Client, source, playl
|
||||
}
|
||||
|
||||
func (m *Main) ripPlaylistMixed(ctx context.Context, playlistID, name string, refs []PlaylistTrackRef) error {
|
||||
requiredSources := map[string]struct{}{}
|
||||
for _, ref := range refs {
|
||||
s := strings.TrimSpace(ref.Source)
|
||||
if s == "" {
|
||||
continue
|
||||
}
|
||||
requiredSources[s] = struct{}{}
|
||||
}
|
||||
for source := range requiredSources {
|
||||
if err := m.requireSourceDownloadAuth(source); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
folder := filepath.Join(m.Config.Session.Downloads.Folder, naming.CleanName(name, naming.Config{
|
||||
RestrictCharacters: m.Config.Session.Filepaths.RestrictCharacters,
|
||||
TruncateTo: m.Config.Session.Filepaths.TruncateTo,
|
||||
|
||||
Reference in New Issue
Block a user