👷 Converted all Enums to StrEnum
This commit is contained in:
+10
-10
@@ -1,4 +1,4 @@
|
|||||||
from enum import Enum
|
from enum import StrEnum
|
||||||
|
|
||||||
CTX_TIDAL: str = "tidal"
|
CTX_TIDAL: str = "tidal"
|
||||||
REQUESTS_TIMEOUT_SEC: int = 45
|
REQUESTS_TIMEOUT_SEC: int = 45
|
||||||
@@ -7,14 +7,14 @@ UNIQUIFY_THRESHOLD: int = 99
|
|||||||
FILENAME_SANITIZE_PLACEHOLDER: str = "_"
|
FILENAME_SANITIZE_PLACEHOLDER: str = "_"
|
||||||
|
|
||||||
|
|
||||||
class QualityVideo(Enum):
|
class QualityVideo(StrEnum):
|
||||||
P360: int = 360
|
P360: int = 360
|
||||||
P480: int = 480
|
P480: int = 480
|
||||||
P720: int = 720
|
P720: int = 720
|
||||||
P1080: int = 1080
|
P1080: int = 1080
|
||||||
|
|
||||||
|
|
||||||
class MediaType(Enum):
|
class MediaType(StrEnum):
|
||||||
TRACK: str = "track"
|
TRACK: str = "track"
|
||||||
VIDEO: str = "video"
|
VIDEO: str = "video"
|
||||||
PLAYLIST: str = "playlist"
|
PLAYLIST: str = "playlist"
|
||||||
@@ -22,20 +22,20 @@ class MediaType(Enum):
|
|||||||
MIX: str = "mix"
|
MIX: str = "mix"
|
||||||
|
|
||||||
|
|
||||||
class SkipExisting(Enum):
|
class SkipExisting(StrEnum):
|
||||||
Disabled: bool = False
|
Disabled: bool = False
|
||||||
Filename: str = "exact"
|
Filename: str = "exact"
|
||||||
ExtensionIgnore: str = "extension_ignore"
|
ExtensionIgnore: str = "extension_ignore"
|
||||||
Append: str = "append"
|
Append: str = "append"
|
||||||
|
|
||||||
|
|
||||||
class StreamManifestMimeType(Enum):
|
class StreamManifestMimeType(StrEnum):
|
||||||
MPD: str = "application/dash+xml"
|
MPD: str = "application/dash+xml"
|
||||||
BTS: str = "application/vnd.tidal.bts"
|
BTS: str = "application/vnd.tidal.bts"
|
||||||
VIDEO: str = "video/mp2t"
|
VIDEO: str = "video/mp2t"
|
||||||
|
|
||||||
|
|
||||||
class CoverDimensions(Enum):
|
class CoverDimensions(StrEnum):
|
||||||
Px80: int = 80
|
Px80: int = 80
|
||||||
Px160: int = 160
|
Px160: int = 160
|
||||||
Px320: int = 320
|
Px320: int = 320
|
||||||
@@ -43,23 +43,23 @@ class CoverDimensions(Enum):
|
|||||||
Px1280: int = 1280
|
Px1280: int = 1280
|
||||||
|
|
||||||
|
|
||||||
class TidalLists(Enum):
|
class TidalLists(StrEnum):
|
||||||
Playlists: str = "Playlists"
|
Playlists: str = "Playlists"
|
||||||
Favorites: str = "Favorites"
|
Favorites: str = "Favorites"
|
||||||
Mixes: str = "Mixes"
|
Mixes: str = "Mixes"
|
||||||
|
|
||||||
|
|
||||||
class AudioExtensions(Enum):
|
class AudioExtensions(StrEnum):
|
||||||
FLAC: str = ".flac"
|
FLAC: str = ".flac"
|
||||||
M4A: str = ".m4a"
|
M4A: str = ".m4a"
|
||||||
MP4: str = ".mp4"
|
MP4: str = ".mp4"
|
||||||
|
|
||||||
|
|
||||||
class VideoExtensions(Enum):
|
class VideoExtensions(StrEnum):
|
||||||
TS: str = ".ts"
|
TS: str = ".ts"
|
||||||
|
|
||||||
|
|
||||||
class QueueDownloadStatus(Enum):
|
class QueueDownloadStatus(StrEnum):
|
||||||
Waiting: str = "⏳️"
|
Waiting: str = "⏳️"
|
||||||
Downloading: str = "▶️"
|
Downloading: str = "▶️"
|
||||||
Finished: str = "✅"
|
Finished: str = "✅"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os.path
|
import os.path
|
||||||
import webbrowser
|
import webbrowser
|
||||||
from enum import Enum
|
from enum import StrEnum
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from PySide6 import QtCore, QtGui, QtWidgets
|
from PySide6 import QtCore, QtGui, QtWidgets
|
||||||
@@ -102,7 +102,7 @@ class DialogPreferences(QtWidgets.QDialog):
|
|||||||
icon: QtGui.QIcon
|
icon: QtGui.QIcon
|
||||||
help_settings: HelpSettings
|
help_settings: HelpSettings
|
||||||
parameters_checkboxes: [str]
|
parameters_checkboxes: [str]
|
||||||
parameters_combo: [(str, Enum)]
|
parameters_combo: [(str, StrEnum)]
|
||||||
parameters_line_edit: [str]
|
parameters_line_edit: [str]
|
||||||
prefix_checkbox: str = "cb_"
|
prefix_checkbox: str = "cb_"
|
||||||
prefix_label: str = "l_"
|
prefix_label: str = "l_"
|
||||||
|
|||||||
Reference in New Issue
Block a user