🛠️ Black reformatting.
This commit is contained in:
+3
-2
@@ -96,8 +96,9 @@ def getVersion():
|
|||||||
|
|
||||||
# Load from gist
|
# Load from gist
|
||||||
try:
|
try:
|
||||||
respond = requests.get("https://api.github.com/gists/48d01f5a24b4b7b37f19443977c22cd6",
|
respond = requests.get(
|
||||||
timeout=REQUESTS_TIMEOUT_SEC)
|
"https://api.github.com/gists/48d01f5a24b4b7b37f19443977c22cd6", timeout=REQUESTS_TIMEOUT_SEC
|
||||||
|
)
|
||||||
if respond.status_code == 200:
|
if respond.status_code == 200:
|
||||||
content = respond.json()["files"]["tidal-api-key.json"]["content"]
|
content = respond.json()["files"]["tidal-api-key.json"]["content"]
|
||||||
__API_KEYS__ = json.loads(content)
|
__API_KEYS__ = json.loads(content)
|
||||||
|
|||||||
+4
-2
@@ -30,7 +30,9 @@ def version_callback(value: bool):
|
|||||||
@app.callback()
|
@app.callback()
|
||||||
def callback_app(
|
def callback_app(
|
||||||
ctx: typer.Context,
|
ctx: typer.Context,
|
||||||
version: Annotated[Optional[bool], typer.Option("--version", "-v", callback=version_callback, is_eager=True)] = None,
|
version: Annotated[
|
||||||
|
Optional[bool], typer.Option("--version", "-v", callback=version_callback, is_eager=True)
|
||||||
|
] = None,
|
||||||
):
|
):
|
||||||
ctx.obj = {"tidal": None}
|
ctx.obj = {"tidal": None}
|
||||||
|
|
||||||
@@ -173,7 +175,7 @@ def download(
|
|||||||
path_base=settings.data.download_base_path,
|
path_base=settings.data.download_base_path,
|
||||||
file_template=file_template,
|
file_template=file_template,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
fn_logger=fn_logger
|
fn_logger=fn_logger,
|
||||||
)
|
)
|
||||||
elif media_name in ["album", "playlist", "mix"]:
|
elif media_name in ["album", "playlist", "mix"]:
|
||||||
# TODO: Handle mixes.
|
# TODO: Handle mixes.
|
||||||
|
|||||||
@@ -218,8 +218,9 @@ class Download:
|
|||||||
totaltrack=track.album.num_tracks if track.album.num_tracks else 1,
|
totaltrack=track.album.num_tracks if track.album.num_tracks else 1,
|
||||||
totaldisc=track.album.num_volumes if track.album.num_volumes else 1,
|
totaldisc=track.album.num_volumes if track.album.num_volumes else 1,
|
||||||
discnumber=track.volume_num,
|
discnumber=track.volume_num,
|
||||||
url_cover=self.cover_url(track.album.cover, settings.data.metadata_cover_width,
|
url_cover=self.cover_url(
|
||||||
settings.data.metadata_cover_height),
|
track.album.cover, settings.data.metadata_cover_width, settings.data.metadata_cover_height
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
m.save()
|
m.save()
|
||||||
|
|||||||
+1
-1
@@ -421,7 +421,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||||||
file_template=file_template,
|
file_template=file_template,
|
||||||
progress_gui=data_pb,
|
progress_gui=data_pb,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
fn_logger=logger_gui
|
fn_logger=logger_gui,
|
||||||
)
|
)
|
||||||
|
|
||||||
if result_download:
|
if result_download:
|
||||||
|
|||||||
@@ -126,8 +126,8 @@ def length_max_name_file() -> int:
|
|||||||
result: int = 255
|
result: int = 255
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if system in ['Darwin', 'Linux']:
|
if system in ["Darwin", "Linux"]:
|
||||||
result: int = os.pathconf('/', 'PC_NAME_MAX')
|
result: int = os.pathconf("/", "PC_NAME_MAX")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -139,8 +139,8 @@ def length_max_name_path() -> int:
|
|||||||
result: int = 255
|
result: int = 255
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if system in ['Darwin', 'Linux']:
|
if system in ["Darwin", "Linux"]:
|
||||||
result: int = os.pathconf('/', 'PC_PATH_MAX')
|
result: int = os.pathconf("/", "PC_PATH_MAX")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ try:
|
|||||||
item: QtCore.Signal
|
item: QtCore.Signal
|
||||||
item_name: QtCore.Signal
|
item_name: QtCore.Signal
|
||||||
list_item: QtCore.Signal
|
list_item: QtCore.Signal
|
||||||
|
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
|
|
||||||
class ProgressBars:
|
class ProgressBars:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user