mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
harden search parsing and qobuz refresh validation
This commit is contained in:
@@ -147,6 +147,9 @@ func (d *Downloader) FileDeezerEncrypted(ctx context.Context, sourceURL, outputP
|
||||
if resp.ContentLength > 0 && totalRead != resp.ContentLength {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err = out.Sync(); err != nil {
|
||||
return err
|
||||
}
|
||||
success = true
|
||||
return nil
|
||||
}
|
||||
@@ -229,6 +232,9 @@ func (d *Downloader) file(ctx context.Context, sourceURL, outputPath string, all
|
||||
if resp.ContentLength > 0 && totalWritten != resp.ContentLength {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err = out.Sync(); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
written, copyErr := io.Copy(out, reader)
|
||||
if copyErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user