From c03a122453703faee6b2f0d2d8eea9056fb160df Mon Sep 17 00:00:00 2001 From: acgnhik Date: Sun, 5 Nov 2023 14:07:30 +0800 Subject: [PATCH] fix: UnicodeDecodeError fix #190 --- src/blrec/postprocess/ffmpeg_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blrec/postprocess/ffmpeg_metadata.py b/src/blrec/postprocess/ffmpeg_metadata.py index 8a7ab9a..7945fd9 100644 --- a/src/blrec/postprocess/ffmpeg_metadata.py +++ b/src/blrec/postprocess/ffmpeg_metadata.py @@ -157,7 +157,7 @@ def _make_comment_for_discontinuities(timestamps: Iterable[int]) -> str: async def _get_discontinuities(playlist_path: str) -> Tuple[List[int], float]: loop = asyncio.get_running_loop() - async with aiofiles.open(playlist_path) as file: + async with aiofiles.open(playlist_path, encoding='utf8') as file: content = await file.read() playlist = await loop.run_in_executor(None, m3u8.loads, content) duration = Decimal()