Implement new fsm

This commit is contained in:
Ben Sarmiento
2024-05-21 01:59:53 +02:00
parent d5dd9426ed
commit 2c5e7a1db0
14 changed files with 121 additions and 59 deletions

View File

@@ -6,7 +6,7 @@ import cmap "github.com/orcaman/concurrent-map/v2"
func (t *TorrentManager) CheckDeletedStatus(torrent *Torrent) bool {
var deletedIDs []int
torrent.SelectedFiles.IterCb(func(_ string, file *File) {
if file.IsDeleted {
if file.State.Is("deleted") {
deletedIDs = append(deletedIDs, file.ID)
}
})