feat: add checksum for torrent downloader
All checks were successful
Pre-commit / pre-commit (pull_request) Successful in 6m0s
Update alr-git / changelog (push) Successful in 28s

This commit is contained in:
2025-06-20 20:12:43 +03:00
parent 6bccce1db4
commit 85878f69d3
4 changed files with 72 additions and 49 deletions

View File

@ -71,7 +71,17 @@ func (TorrentDownloader) Download(ctx context.Context, opts Options) (Type, stri
return 0, "", err
}
return determineType(opts.Destination)
dlType, name, err := determineType(opts.Destination)
if err != nil {
return 0, "", err
}
err = VerifyHashFromLocal(name, opts)
if err != nil {
return 0, "", err
}
return dlType, name, nil
}
func removeTorrentFiles(path string) error {