From e3fa5d9de0aa6b3f8ed0adc1fb956cac17b4a5c9 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 9 Dec 2019 09:35:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E4=B8=8B=E6=92=AD=E9=A9=AC?= =?UTF-8?q?=E4=B8=8A=E4=B8=8A=E6=92=AD=E5=AE=83=E8=BF=98=E6=98=AF=E6=8A=8A?= =?UTF-8?q?=E7=A8=BF=E6=8A=95=E5=87=BA=E5=8E=BB=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=88=E6=9C=AA=E6=B5=8B=E8=AF=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Common.py b/Common.py index ff91d07..2d6c978 100644 --- a/Common.py +++ b/Common.py @@ -299,7 +299,7 @@ def appendError(obj): def loginBilibili(force=False): if config["dlO"] is False or forceNotUpload is False: global loginTime - if not force and getTimeDelta(datetime.now(), loginTime) < 86400 * 3: + if not force or getTimeDelta(datetime.now(), loginTime) < 86400 * 5: return False res = b.login(config["b_u"], config["b_p"]) loginTime = datetime.now() @@ -326,6 +326,7 @@ class downloader(XiGuaLiveApi): if self.isLive: self.updPlayList() else: + resetDelay() self.playlist = False def updPlayList(self): @@ -381,9 +382,9 @@ def uploadVideo(name): global isUpload if not os.path.exists(name): Common.appendError("Upload File Not Exist {}".format(name)) + isUpload = True loginBilibili() doClean() - isUpload = True if forceNotUpload is False: b.preUpload(VideoPart(name, os.path.basename(name))) else: @@ -414,9 +415,9 @@ def encodeVideo(name): if os.path.getsize(name) < 8 * 1024 * 1024: appendEncodeStatus("Encoded File >{}< is too small, will ignore it".format(name)) return False - appendEncodeStatus("Encoding >{}< Start".format(name)) global isEncode isEncode=True + appendEncodeStatus("Encoding >{}< Start".format(name)) _new_name = os.path.splitext(name)[0]+".mp4" _code = os.system(config["enc"].format(f=name, t=_new_name)) if _code != 0: