feat(offline_download): add transmission (close #4102 in #7232)

This commit is contained in:
Shelton Zhu
2024-09-28 23:15:58 +08:00
committed by GitHub
parent 6106a2d4cc
commit bdf4b52885
8 changed files with 248 additions and 8 deletions

View File

@ -101,6 +101,19 @@ outer:
}
}
}
if t.tool.Name() == "transmission" {
// hack for transmission
seedTime := setting.GetInt(conf.TransmissionSeedtime, 0)
if seedTime >= 0 {
t.Status = "offline download completed, waiting for seeding"
<-time.After(time.Minute * time.Duration(seedTime))
err := t.tool.Remove(t)
if err != nil {
log.Errorln(err.Error())
}
}
}
return nil
}