Fix: Actions when upload finished will not work fixed

This commit is contained in:
Jerry Yan 2019-02-02 19:21:26 +08:00
parent 530522f51c
commit 0219d5d1aa
2 changed files with 4 additions and 1 deletions

View File

@ -323,6 +323,8 @@ class Bilibili:
"videos": self.videos}
)
print(r.text)
def clear(self):
self.files.clear()
self.videos.clear()

View File

@ -148,10 +148,11 @@ def upload(date=datetime.strftime(datetime.now(), "%Y_%m_%d")):
elif config["del"]:
for _p in b.files:
os.remove(_p.path)
b.clear()
break
print("{} : Upload {}".format(datetime.strftime(datetime.now(), "%y%m%d %H%M"), i))
try:
b.preUpload(VideoPart(i, i))
b.preUpload(VideoPart(i, os.path.basename(i)))
except:
continue
i = uq.get()