mirror of
https://github.com/simon-ding/polaris.git
synced 2026-05-25 03:57:47 +08:00
refactor: copy downloaded file according to torrent info
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package pkg
|
||||
|
||||
import "io/fs"
|
||||
|
||||
type Torrent interface {
|
||||
Name() (string, error)
|
||||
Progress() (int, error)
|
||||
@@ -11,10 +13,10 @@ type Torrent interface {
|
||||
SeedRatio() (float64, error)
|
||||
GetHash() string
|
||||
//Reload() error
|
||||
WalkFunc() func(fn func(path string, info fs.FileInfo) error) error
|
||||
}
|
||||
|
||||
type Downloader interface {
|
||||
GetAll() ([]Torrent, error)
|
||||
Download(link, dir string) (Torrent, error)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user