From bfbbe06cd2b7b4eb779b28bb96d10eee5f5d5eab Mon Sep 17 00:00:00 2001 From: JerryYan ECS Date: Sun, 3 Mar 2019 00:50:53 +0800 Subject: [PATCH] liveDownloader updPlaylist when finished downloading a part --- liveDownloader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/liveDownloader.py b/liveDownloader.py index 980dd75..3956704 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -91,6 +91,7 @@ class downloader(XiGuaLiveApi): if len(self.files) > 800: q.put(True) self.files.clear() + self.updRoomInfo() def download(path=datetime.strftime(datetime.now(), "%Y%m%d_%H%M.ts")): @@ -137,13 +138,13 @@ def upload(date=datetime.strftime(datetime.now(), "%Y_%m_%d")): b.preUpload(VideoPart(i, os.path.basename(i))) except: continue - + if config["mv"]: shutil.move(i, config["mtd"]) elif config["del"]: os.remove(i) i = uq.get() - + print("{} : Upload Daemon Quiting".format(datetime.strftime(datetime.now(), "%y%m%d %H%M"))) @@ -163,7 +164,7 @@ if __name__ == "__main__": _preT = datetime.strftime(datetime.now(), "%Y%m%d_%H%M.ts") t = threading.Thread(target=download, args=(_preT,)) ut = threading.Thread(target=upload, args=(d,)) - + while True: if api.isLive: if d is None: