Upkeep for data directory

This commit is contained in:
Ben Sarmiento
2024-05-21 06:50:46 +02:00
parent 57df90620e
commit 6c24d74f61
4 changed files with 67 additions and 9 deletions

View File

@@ -473,6 +473,9 @@ func (t *TorrentManager) canCapacityHandle() bool {
}
func (t *TorrentManager) markAsUnplayable(torrent *Torrent, reason string) {
if torrent.State.Is("unplayable") {
return
}
t.log.Warnf("Marking torrent %s as unplayable - %s", t.GetKey(torrent), reason)
err := torrent.State.Event(context.Background(), "mark_as_unplayable")
if err != nil {