Использование auto() в LyricsFormat
This commit is contained in:
parent
e8ab89cd7f
commit
dd8f4cb056
2 changed files with 7 additions and 6 deletions
|
|
@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "yandex-music-downloader"
|
name = "yandex-music-downloader"
|
||||||
version = "3.2.1b1"
|
version = "3.2.1b2"
|
||||||
description = "Загрузчик музыки с сервиса Яндекс.Музыка"
|
description = "Загрузчик музыки с сервиса Яндекс.Музыка"
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
11
ymd/core.py
11
ymd/core.py
|
|
@ -3,6 +3,7 @@ import random
|
||||||
import re
|
import re
|
||||||
import typing
|
import typing
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from enum import auto
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
|
|
@ -23,7 +24,7 @@ from mutagen.id3._frames import (
|
||||||
from mutagen.id3._specs import ID3TimeStamp, PictureType
|
from mutagen.id3._specs import ID3TimeStamp, PictureType
|
||||||
from mutagen.mp3 import MP3
|
from mutagen.mp3 import MP3
|
||||||
from mutagen.mp4 import MP4, MP4Cover
|
from mutagen.mp4 import MP4, MP4Cover
|
||||||
from strenum import StrEnum
|
from strenum import LowercaseStrEnum
|
||||||
from yandex_music import Client, DownloadInfo, Track, YandexMusicObject
|
from yandex_music import Client, DownloadInfo, Track, YandexMusicObject
|
||||||
|
|
||||||
from ymd.api import get_lossless_info
|
from ymd.api import get_lossless_info
|
||||||
|
|
@ -40,10 +41,10 @@ MAX_COMPATIBILITY_LEVEL = 1
|
||||||
AUDIO_FILE_SUFFIXES = {".mp3", ".flac", ".m4a"}
|
AUDIO_FILE_SUFFIXES = {".mp3", ".flac", ".m4a"}
|
||||||
|
|
||||||
|
|
||||||
class LyricsFormat(StrEnum):
|
class LyricsFormat(LowercaseStrEnum):
|
||||||
NONE = "none"
|
NONE = auto()
|
||||||
TEXT = "text"
|
TEXT = auto()
|
||||||
LRC = "lrc"
|
LRC = auto()
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue