fix: wrong rename let values duplicate, and rename file as type to fix import error
Fixes: 4c01aa7467
(refactor: convert Enum to StrEnum and reduce some duplicated code)
This commit is contained in:
parent
4c01aa7467
commit
d16d14e20d
@ -12,7 +12,7 @@ from rich.progress import Progress, TaskID
|
||||
from rich.theme import Theme
|
||||
|
||||
from .api import NCMApi
|
||||
from .enum import LinkType
|
||||
from .type import LinkType
|
||||
from .error import ParseLinkError, UnsupportedLinkError
|
||||
from .lrc import Lrc
|
||||
from .object import NCMAlbum, NCMPlaylist, NCMTrack
|
||||
|
@ -6,7 +6,7 @@ from re import compile as compileRegex
|
||||
from typing import Generator, Iterable, Self
|
||||
|
||||
from .constant import CONFIG_LRC_AUTO_MERGE, CONFIG_LRC_AUTO_MERGE_OFFSET
|
||||
from .enum import LrcMetaType, LrcType
|
||||
from .type import LrcMetaType, LrcType
|
||||
from .error import UnsupportedPureMusicTrackError
|
||||
from .object import NCMLyrics
|
||||
|
||||
|
@ -4,7 +4,7 @@ from typing import Self
|
||||
|
||||
from httpx import Response
|
||||
|
||||
from .enum import LrcType
|
||||
from .type import LrcType
|
||||
from .error import ObjectParseError
|
||||
|
||||
__all__ = ["NCMTrack", "NCMAlbum", "NCMPlaylist", "NCMLyrics"]
|
||||
|
@ -33,7 +33,7 @@ class LrcMetaType(StrEnum):
|
||||
Album = "al"
|
||||
Author = "au"
|
||||
Length = "length"
|
||||
Author = "by"
|
||||
LrcAuthor = "by"
|
||||
Offset = "offset"
|
||||
|
||||
|
@ -6,7 +6,7 @@ from urllib.parse import urlparse as parseUrl
|
||||
|
||||
from httpx import get as getHttp
|
||||
|
||||
from .enum import LinkType
|
||||
from .type import LinkType
|
||||
from .error import ParseLinkError, UnsupportedLinkError
|
||||
|
||||
__all__ = ["Link", "parseLink", "safeFileName"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
from pathlib import Path
|
||||
from unittest import TestCase
|
||||
|
||||
from ncmlyrics.enum import LinkType
|
||||
from ncmlyrics.type import LinkType
|
||||
from ncmlyrics.error import ParseLinkError, UnsupportedLinkError
|
||||
from ncmlyrics.object import NCMTrack
|
||||
from ncmlyrics.util import Link, parseLink, pickOutput, testExistTrackSource
|
||||
|
Loading…
Reference in New Issue
Block a user