feat: save hash instead of link, and refactor torrent download

This commit is contained in:
Simon Ding
2025-02-01 14:22:34 +08:00
parent 8b6558b2b5
commit 2821d49673
18 changed files with 463 additions and 236 deletions

View File

@@ -18,5 +18,5 @@ type Torrent interface {
type Downloader interface {
GetAll() ([]Torrent, error)
Download(link, dir string) (Torrent, error)
Download(link, hash, dir string) (Torrent, error)
}