👷 Legacy code cleanup due to tidalapi update.
This commit is contained in:
Generated
+11
-1
@@ -502,6 +502,16 @@ files = [
|
||||
[package.extras]
|
||||
test = ["pytest (>=6)"]
|
||||
|
||||
[[package]]
|
||||
name = "ffmpeg"
|
||||
version = "1.4"
|
||||
description = "ffmpeg python package url [https://github.com/jiashaokun/ffmpeg]"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
files = [
|
||||
{file = "ffmpeg-1.4.tar.gz", hash = "sha256:6931692c890ff21d39938433c2189747815dca0c60ddc7f9bb97f199dba0b5b9"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ffmpeg-python"
|
||||
version = "0.2.0"
|
||||
@@ -2148,4 +2158,4 @@ gui = ["pyqtdarktheme", "pyside6"]
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = ">=3.10,<3.12"
|
||||
content-hash = "da2f28a635a35b07a2fe5b3e559ab00376b6fa59c67711baf3551ed6f037af1f"
|
||||
content-hash = "b04cffe26d9deb359b534d6e81207e14427fba01ce962ab823a1a581fe155317"
|
||||
|
||||
+2
-1
@@ -41,6 +41,7 @@ mpegdash = "^0.4.0"
|
||||
rich = "^13.7.1"
|
||||
toml = "^0.10.2"
|
||||
typer = "^0.12.3"
|
||||
ffmpeg = "^1.4"
|
||||
|
||||
[tool.poetry.extras]
|
||||
gui = ["pyside6", "pyqtdarktheme"]
|
||||
@@ -171,7 +172,7 @@ profile = "black"
|
||||
multi_line_output = 3
|
||||
indent = 4
|
||||
color_output = true
|
||||
known_third_party = ["Crypto", "PySide6", "coloredlogs", "dataclasses_json", "ffmpeg", "m3u8", "mpegdash", "mutagen", "pathvalidate", "requests", "rich", "tidalapi", "toml", "typer"]
|
||||
known_third_party = ["Crypto", "PySide6", "coloredlogs", "dataclasses_json", "mutagen", "pathvalidate", "requests", "rich", "tidalapi", "toml", "typer"]
|
||||
|
||||
[tool.mypy]
|
||||
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
|
||||
|
||||
+12
-12
@@ -1,4 +1,4 @@
|
||||
from enum import IntEnum, StrEnum
|
||||
from enum import StrEnum
|
||||
|
||||
CTX_TIDAL: str = "tidal"
|
||||
REQUESTS_TIMEOUT_SEC: int = 45
|
||||
@@ -7,11 +7,11 @@ UNIQUIFY_THRESHOLD: int = 99
|
||||
FILENAME_SANITIZE_PLACEHOLDER: str = "_"
|
||||
|
||||
|
||||
class QualityVideo(IntEnum):
|
||||
P360: int = 360
|
||||
P480: int = 480
|
||||
P720: int = 720
|
||||
P1080: int = 1080
|
||||
class QualityVideo(StrEnum):
|
||||
P360: str = "360"
|
||||
P480: str = "480"
|
||||
P720: str = "720"
|
||||
P1080: str = "1080"
|
||||
|
||||
|
||||
class MediaType(StrEnum):
|
||||
@@ -29,12 +29,12 @@ class SkipExisting(StrEnum):
|
||||
Append: str = "append"
|
||||
|
||||
|
||||
class CoverDimensions(IntEnum):
|
||||
Px80: int = 80
|
||||
Px160: int = 160
|
||||
Px320: int = 320
|
||||
Px640: int = 640
|
||||
Px1280: int = 1280
|
||||
class CoverDimensions(StrEnum):
|
||||
Px80: str = "80"
|
||||
Px160: str = "160"
|
||||
Px320: str = "320"
|
||||
Px640: str = "640"
|
||||
Px1280: str = "1280"
|
||||
|
||||
|
||||
class TidalLists(StrEnum):
|
||||
|
||||
+1
-3
@@ -2,7 +2,6 @@ import math
|
||||
import sys
|
||||
import time
|
||||
from collections.abc import Callable
|
||||
from enum import Enum
|
||||
|
||||
from requests.exceptions import HTTPError
|
||||
|
||||
@@ -304,8 +303,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
]
|
||||
|
||||
for item in l_cb:
|
||||
needle: str | int = item["setting"].name if isinstance(item["setting"], Enum) else item["setting"]
|
||||
idx = item["element"].findText(needle)
|
||||
idx = item["element"].findData(item["setting"])
|
||||
|
||||
if idx > -1:
|
||||
item["element"].setCurrentIndex(idx)
|
||||
|
||||
Reference in New Issue
Block a user