Resolve infuse routing issues
This commit is contained in:
@@ -87,10 +87,16 @@ type TorrentInfo struct {
|
||||
}
|
||||
|
||||
func (i *TorrentInfo) IsDone() bool {
|
||||
selectedCount := 0
|
||||
for _, file := range i.Files {
|
||||
if file.Selected == 1 {
|
||||
selectedCount++
|
||||
}
|
||||
}
|
||||
if i.Progress != 100 {
|
||||
return false
|
||||
}
|
||||
return len(i.Files) == len(i.Links) && len(i.Files) > 0
|
||||
return selectedCount == len(i.Links) && len(i.Links) > 0
|
||||
}
|
||||
|
||||
func (i *TorrentInfo) MarshalJSON() ([]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user