From 798ff0ddb7658e4f5bdc4732577f88299344ddf8 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sun, 7 Jan 2024 21:51:38 +0100 Subject: [PATCH] Separate mark as unfixable and unplayable torrents --- internal/torrent/repair.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/torrent/repair.go b/internal/torrent/repair.go index b7621e1..91b7a85 100644 --- a/internal/torrent/repair.go +++ b/internal/torrent/repair.go @@ -191,6 +191,7 @@ func (t *TorrentManager) repair(torrent *Torrent) { } torrent.SelectedFiles.Set(unassigned.Filename, newFile) } + t.markAsUnfixable(torrent) t.markAsUnplayable(torrent) } return @@ -355,7 +356,6 @@ func (t *TorrentManager) canCapacityHandle() bool { func (t *TorrentManager) markAsUnplayable(torrent *Torrent) { t.log.Warnf("Marking torrent %s as unplayable", torrent.AccessKey) - t.markAsUnfixable(torrent) t.DirectoryMap.IterCb(func(directory string, torrents cmap.ConcurrentMap[string, *Torrent]) { torrents.Remove(torrent.AccessKey) }) @@ -364,6 +364,7 @@ func (t *TorrentManager) markAsUnplayable(torrent *Torrent) { } func (t *TorrentManager) markAsUnfixable(torrent *Torrent) { + t.log.Warnf("Marking torrent %s as unfixable", torrent.AccessKey) torrent.Unfixable = true infoCache, _ := t.DirectoryMap.Get(INT_INFO_CACHE) torrent.DownloadedIDs.Each(func(id string) bool {