mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
Fix import on startup which got broken in previous commit.
This commit is contained in:
parent
377f8cf886
commit
13b2e7da26
@ -36,7 +36,7 @@
|
||||
|
||||
import os
|
||||
import time
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
from wsgiref.handlers import format_date_time
|
||||
import shutil
|
||||
|
||||
@ -92,7 +92,7 @@ class Core(CorePluginBase):
|
||||
if self.config["last_update"]:
|
||||
now = datetime.now()
|
||||
last_update = datetime.fromtimestamp(self.config["last_update"])
|
||||
check_period = datetime.timedelta(days=self.config["check_after_days"])
|
||||
check_period = timedelta(days=self.config["check_after_days"])
|
||||
if not self.config["last_update"] or last_update + check_period >= now:
|
||||
update_now = True
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user