Исправление кодировки по умолчанию для LRC

This commit is contained in:
Lev Plyusnin 2024-12-24 16:10:53 +07:00
parent 1dee95a7c4
commit c8be15391d
No known key found for this signature in database
GPG key ID: 21C6C2C9C0A4460D
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "yandex-music-downloader"
version = "3.2.2b0"
version = "3.2.3b0"
description = "Загрузчик музыки с сервиса Яндекс.Музыка"
requires-python = ">=3.9"
readme = "README.md"

View file

@ -239,7 +239,7 @@ def download_track(
lrc_lyrics = track_lyrics.fetch_lyrics()
lrc_path = target_path.with_suffix(".lrc")
if not lrc_path.is_file():
with open(lrc_path, "w") as f:
with open(lrc_path, "w", encoding="utf-8") as f:
f.write(lrc_lyrics)
elif lyrics_info.has_available_text_lyrics:
if track_lyrics := track.get_lyrics(format="TEXT"):