Rewrite state machines

This commit is contained in:
Ben Sarmiento
2024-05-21 17:07:40 +02:00
parent 6c24d74f61
commit 0743b01223
12 changed files with 69 additions and 55 deletions

View File

@@ -104,7 +104,7 @@ func (t *TorrentManager) UnrestrictLinkUntilOk(link string) *realdebrid.Download
}
func (t *TorrentManager) UnrestrictFileUntilOk(file *File) *realdebrid.Download {
if !file.State.Is("ok") {
if !file.State.Is("ok_file") {
return nil
}
return t.UnrestrictLinkUntilOk(file.Link)