Add accidental removal fix

This commit is contained in:
Ben Adrian Sarmiento
2024-07-19 04:42:09 +02:00
parent eaabd20a83
commit d2c1e12e2c
6 changed files with 17 additions and 15 deletions

View File

@@ -15,6 +15,7 @@ func HandleRenameTorrent(directory, torrentName, newName string, torMgr *torrent
if !ok {
return fmt.Errorf("cannot find torrent %s", torrentName)
}
// todo: need to remove on all directories
torrents.Remove(torrentName)
torrents.Set(newName, torrent)
torrent.Rename = newName