From db6e0be776076f84f148e30c17f91dee1e3342f3 Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Sun, 27 Mar 2022 15:17:32 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E5=B9=95xml=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=86=99=E5=85=A5=E9=80=BB=E8=BE=91=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Common.py | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/Common.py b/Common.py
index fd10af5..1ee0026 100644
--- a/Common.py
+++ b/Common.py
@@ -321,7 +321,7 @@ class downloader(XiGuaLiveApi):
if self.__danmakuBiasTime is None:
return
ts = (now - self.__danmakuBiasTime).total_seconds()
- _c = """""".format(ts, gift.user.name, gift.name, gift.count)
+ _c = """\r\n""".format(ts, gift.user.name, gift.name, gift.count)
self.__danmakuFile.write(_c.encode("UTF-8"))
def onChat(self, chat):
@@ -330,14 +330,9 @@ class downloader(XiGuaLiveApi):
if self.__danmakuBiasTime is None:
return
ts = (now - self.__danmakuBiasTime).total_seconds()
- _c = """{}""".format(ts, now.timestamp()*1000, chat.user.ID, chat.user.name, chat.content)
+ _c = """{}\r\n""".format(ts, now.timestamp()*1000, chat.user.ID, chat.user.name, chat.content)
self.__danmakuFile.write(_c.encode("UTF-8"))
- def getDanmaku(self):
- super(downloader, self).getDanmaku()
- if self.__danmakuFile is not None and self.__danmakuFile.writable():
- self.__danmakuFile.flush()
-
@property
def playlist(self):
return self.__playlist