Create a torrentMap

This commit is contained in:
Ben Sarmiento
2023-11-08 20:20:52 +01:00
parent 17cd7ae1f4
commit 9dfd6c32d5
16 changed files with 405 additions and 324 deletions

View File

@@ -20,15 +20,16 @@ type UnrestrictResponse struct {
}
type Torrent struct {
ID string `json:"id"`
Name string `json:"filename"`
OriginalName string `json:"original_filename"`
Hash string `json:"hash"`
Progress int `json:"-"`
Added string `json:"added"`
Bytes int64 `json:"bytes"`
Links []string `json:"links"`
Files []File `json:"files,omitempty"`
ID string `json:"id"`
Name string `json:"filename"`
OriginalName string `json:"original_filename"`
Hash string `json:"hash"`
Progress int `json:"-"`
Added string `json:"added"`
Bytes int64 `json:"bytes"`
OriginalBytes int64 `json:"original_bytes"`
Links []string `json:"links"`
Files []File `json:"files,omitempty"`
}
func (t *Torrent) UnmarshalJSON(data []byte) error {