more exactly time settings

This commit is contained in:
Jerry Yan 2019-04-30 10:09:42 +08:00
parent 1f07e1046c
commit 46b3500faa

View File

@ -6,7 +6,6 @@ from glob import glob
import psutil import psutil
from api import XiGuaLiveApi from api import XiGuaLiveApi
import json import json
from bilibili import Bilibili
import threading import threading
from bypy import ByPy from bypy import ByPy
@ -57,7 +56,7 @@ def _doClean(_force=False):
if not os.path.exists(_i): if not os.path.exists(_i):
break break
doCleanTime = datetime.now() doCleanTime = datetime.now()
if (datetime.now() - datetime.utcfromtimestamp(os.path.getmtime(_i))).days > config["exp"]: if (datetime.now() - datetime.utcfromtimestamp(os.path.getmtime(_i))).days >= config["exp"]:
_clean_flag = True _clean_flag = True
if config["dow"] == "bypy": if config["dow"] == "bypy":
_res = bypy.upload(_i) _res = bypy.upload(_i)