saveTorrentChangesToDisk when relevant
This commit is contained in:
@@ -12,9 +12,7 @@ func (t *TorrentManager) CheckDeletedStatus(torrent *Torrent) bool {
|
||||
if len(unselectedIDs) == torrent.SelectedFiles.Count() && len(unselectedIDs) > 0 {
|
||||
return true
|
||||
} else if len(unselectedIDs) > 0 {
|
||||
infoCache, _ := t.DirectoryMap.Get(INT_INFO_CACHE)
|
||||
torrent.DownloadedIDs.Each(func(id string) bool {
|
||||
info, _ := infoCache.Get(id)
|
||||
t.saveTorrentChangesToDisk(torrent, func(info *Torrent) {
|
||||
info.SelectedFiles.IterCb(func(_ string, file *File) {
|
||||
for _, unselectedID := range unselectedIDs {
|
||||
if file.ID == unselectedID {
|
||||
@@ -23,8 +21,6 @@ func (t *TorrentManager) CheckDeletedStatus(torrent *Torrent) bool {
|
||||
}
|
||||
}
|
||||
})
|
||||
t.writeTorrentToFile(id, info)
|
||||
return false
|
||||
})
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user