From 8f2d26ac109fc1afb84b13ba468e4099c8c93233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Sat, 27 Jan 2024 22:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AC=E5=9C=B0flac?= =?UTF-8?q?=E9=9F=B3=E4=B9=90=E6=92=AD=E6=94=BE=E5=90=8E=E5=8E=BB=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E9=94=99=E8=AF=AF=E9=9F=B3=E4=B9=90=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaomusic/xiaomusic.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xiaomusic/xiaomusic.py b/xiaomusic/xiaomusic.py index 53e5c336f..118415edc 100644 --- a/xiaomusic/xiaomusic.py +++ b/xiaomusic/xiaomusic.py @@ -101,16 +101,16 @@ async def poll_latest_ask(self): async with ClientSession() as session: session._cookie_jar = self.cookie_jar while True: - self.log.debug( - "Listening new message, timestamp: %s", self.last_timestamp - ) + # self.log.debug( + # "Listening new message, timestamp: %s", self.last_timestamp + # ) await self.get_latest_ask_from_xiaoai(session) start = time.perf_counter() - self.log.debug("Polling_event, timestamp: %s", self.last_timestamp) + # self.log.debug("Polling_event, timestamp: %s", self.last_timestamp) await self.polling_event.wait() if (d := time.perf_counter() - start) < 1: # sleep to avoid too many request - self.log.debug("Sleep %f, timestamp: %s", d, self.last_timestamp) + # self.log.debug("Sleep %f, timestamp: %s", d, self.last_timestamp) await asyncio.sleep(1 - d) async def init_all_data(self, session): @@ -453,7 +453,7 @@ async def play(self, **kwargs): # 下一首 async def play_next(self, **kwargs): self.log.info("下一首") - name = self.cur_music + (name, _) = os.path.splitext(os.path.basename(self.cur_music)) if self.play_type == PLAY_TYPE_ALL or name == "": name = self.random_music() if name == "":