Clone set before modifying
This commit is contained in:
@@ -46,7 +46,8 @@ type TorrentManager struct {
|
||||
DumpTrigger chan struct{}
|
||||
AnalyzeTrigger chan struct{}
|
||||
|
||||
latestState *LibraryState
|
||||
latestState *LibraryState
|
||||
inProgressHashes mapset.Set[string]
|
||||
|
||||
repairTrigger chan *Torrent
|
||||
repairQueue mapset.Set[*Torrent]
|
||||
@@ -221,7 +222,7 @@ func (t *TorrentManager) writeTorrentToFile(torrent *Torrent) {
|
||||
return
|
||||
}
|
||||
|
||||
t.log.Debugf("Saved torrent %s to file", t.GetKey(torrent))
|
||||
// t.log.Debugf("Saved torrent %s to file", t.GetKey(torrent))
|
||||
}
|
||||
|
||||
func (t *TorrentManager) applyMediaInfoDetails(torrent *Torrent) {
|
||||
@@ -269,11 +270,6 @@ func (t *TorrentManager) readTorrentFromFile(filePath string) *Torrent {
|
||||
return torrent
|
||||
}
|
||||
|
||||
func (t *TorrentManager) deleteTorrentFile(filename string) {
|
||||
filePath := "data/" + filename + ".zurgtorrent"
|
||||
_ = os.Remove(filePath)
|
||||
}
|
||||
|
||||
/// end torrent functions
|
||||
|
||||
/// info functions
|
||||
|
||||
Reference in New Issue
Block a user