Add utils
This commit is contained in:
@@ -66,8 +66,8 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
t.mountDownloads()
|
||||
t.refreshTorrents()
|
||||
t.SetNewLatestState(t.getCurrentState())
|
||||
t.startRefreshJob()
|
||||
t.startRepairJob()
|
||||
t.StartRefreshJob()
|
||||
t.StartRepairJob()
|
||||
|
||||
return t
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ func (t *TorrentManager) refreshTorrents() []string {
|
||||
return updatedPaths
|
||||
}
|
||||
|
||||
// startRefreshJob periodically refreshes the torrents
|
||||
func (t *TorrentManager) startRefreshJob() {
|
||||
// StartRefreshJob periodically refreshes the torrents
|
||||
func (t *TorrentManager) StartRefreshJob() {
|
||||
_ = t.refreshPool.Submit(func() {
|
||||
t.log.Info("Starting periodic refresh job")
|
||||
for {
|
||||
|
||||
@@ -17,7 +17,7 @@ const (
|
||||
EXPIRED_LINK_TOLERANCE_HOURS = 24
|
||||
)
|
||||
|
||||
func (t *TorrentManager) startRepairJob() {
|
||||
func (t *TorrentManager) StartRepairJob() {
|
||||
if !t.Config.EnableRepair() {
|
||||
t.log.Debug("Repair is disabled, skipping repair job")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user