Fix logic on id ref
This commit is contained in:
@@ -44,8 +44,9 @@ func (t *TorrentManager) RefreshTorrents() []string {
|
|||||||
noInfoCount++
|
noInfoCount++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
torrentID := info.DownloadedIDs.ToSlice()[0]
|
torrentIDs := info.DownloadedIDs.ToSlice()
|
||||||
if !info.AnyInProgress() && t.forRepairs.Contains(torrentID) {
|
if !info.AnyInProgress() && len(torrentIDs) > 0 && t.forRepairs.Contains(info.DownloadedIDs.ToSlice()[0]) {
|
||||||
|
torrentID := info.DownloadedIDs.ToSlice()[0]
|
||||||
// if it's 100% and it's a temp repair, remove it
|
// if it's 100% and it's a temp repair, remove it
|
||||||
t.Api.DeleteTorrent(torrentID)
|
t.Api.DeleteTorrent(torrentID)
|
||||||
toReinsert.Add(t.GetKey(info))
|
toReinsert.Add(t.GetKey(info))
|
||||||
|
|||||||
Reference in New Issue
Block a user