Intgegrate replaychat into livechat (multithread)
This commit is contained in:
@@ -169,16 +169,15 @@ class LiveChatAsync:
|
||||
await asyncio.sleep(diff_time)
|
||||
continuation = metadata.get('continuation')
|
||||
except ChatParseException as e:
|
||||
self.terminate()
|
||||
logger.error(f"{str(e)}(video_id:\"{self.video_id}\")")
|
||||
#self.terminate()
|
||||
logger.debug(f"[{self.video_id}]{str(e)}")
|
||||
return
|
||||
except (TypeError , json.JSONDecodeError) :
|
||||
self.terminate()
|
||||
#self.terminate()
|
||||
logger.error(f"{traceback.format_exc(limit = -1)}")
|
||||
return
|
||||
|
||||
logger.debug(f"[{self.video_id}]finished fetching chat.")
|
||||
self.terminate()
|
||||
|
||||
async def _check_pause(self, continuation):
|
||||
if self._pauser.empty():
|
||||
@@ -269,6 +268,9 @@ class LiveChatAsync:
|
||||
raise IllegalFunctionCall(
|
||||
"既にcallbackを登録済みのため、get()は実行できません。")
|
||||
|
||||
def get_mode(self):
|
||||
return self._parser.mode
|
||||
|
||||
def pause(self):
|
||||
if self._callback is None:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user