Fix repairs

This commit is contained in:
Ben Sarmiento
2023-12-07 11:53:35 +01:00
parent 35bffc12f5
commit caa42822ac
4 changed files with 48 additions and 13 deletions

View File

@@ -38,13 +38,13 @@ func (t *TorrentManager) Repair(torrent *Torrent) {
t.log.Infof("Repairing torrent %s", torrent.AccessKey)
t.repair(torrent)
t.log.Infof("Finished repairing torrent %s", torrent.AccessKey)
})
var updatedPaths []string
t.assignedDirectoryCb(torrent, func(directory string) {
updatedPaths = append(updatedPaths, fmt.Sprintf("%s/%s", directory, torrent.AccessKey))
var updatedPaths []string
t.assignedDirectoryCb(torrent, func(directory string) {
updatedPaths = append(updatedPaths, fmt.Sprintf("%s/%s", directory, torrent.AccessKey))
})
t.TriggerHookOnLibraryUpdate(updatedPaths)
})
t.TriggerHookOnLibraryUpdate(updatedPaths)
}
func (t *TorrentManager) repair(torrent *Torrent) {