From 7d5e5caf6e9e9da2836f5a6882fcc93fbadac7b6 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Thu, 7 Dec 2023 16:33:04 +0100 Subject: [PATCH] Remove doubly hook --- internal/torrent/repair.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/internal/torrent/repair.go b/internal/torrent/repair.go index 40ae569..1120d00 100644 --- a/internal/torrent/repair.go +++ b/internal/torrent/repair.go @@ -26,16 +26,11 @@ func (t *TorrentManager) repairAll() { } }) t.log.Debugf("Found %d torrents to repair", len(toRepair)) - var updatedPaths []string for i := range toRepair { torrent := toRepair[i] t.log.Infof("Repairing %s", torrent.AccessKey) t.repair(torrent) - t.assignedDirectoryCb(torrent, func(directory string) { - updatedPaths = append(updatedPaths, fmt.Sprintf("%s/%s", directory, torrent.AccessKey)) - }) } - t.TriggerHookOnLibraryUpdate(updatedPaths) } func (t *TorrentManager) Repair(torrent *Torrent) { @@ -43,12 +38,6 @@ 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)) - }) - t.TriggerHookOnLibraryUpdate(updatedPaths) }) }