From 798af607bb0cf474e3ad48cdfa38a37b9e6bbbbf Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Fri, 11 Feb 2022 09:29:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=87=E6=AE=B5=E4=B8=8B=E8=BD=BD=E5=AE=8C?= =?UTF-8?q?=E6=AF=95=E5=90=8E=EF=BC=8C=E5=BC=80=E4=B8=80=E4=B8=AA=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E6=9B=B4=E6=96=B0=E4=B8=8B=E7=9B=B4=E6=92=AD=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common.py | 6 ++++++ liveDownloader.py | 1 + 2 files changed, 7 insertions(+) diff --git a/Common.py b/Common.py index e427e46..d24b106 100644 --- a/Common.py +++ b/Common.py @@ -361,6 +361,12 @@ class downloader(XiGuaLiveApi): api = downloader(config["l_u"]) +def doUpdatePlaylist(_force=False): + p = threading.Thread(target=api.updRoomInfo, args=(_force,)) + p.setDaemon(True) + p.start() + + def refreshDownloader(): global api api = downloader(config["l_u"]) diff --git a/liveDownloader.py b/liveDownloader.py index a99d9c0..18734dc 100644 --- a/liveDownloader.py +++ b/liveDownloader.py @@ -45,6 +45,7 @@ def download(): Common.modifyLastDownloadStatus("Downloaded File >{}< is too small, will ignore it".format(path)) else: Common.encodeQueue.put(path) + Common.doUpdatePlaylist() Common.api.updRoomInfo(True)