From 65dbe8524154a9c36413c40185b91ab0b10f82aa Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Wed, 13 Nov 2024 13:45:38 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Bug=20fix=20for=20import=20constant?= =?UTF-8?q?s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- tidal_dl_ng/download.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5cd1554..0e78e05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -171,7 +171,7 @@ profile = "black" multi_line_output = 3 indent = 4 color_output = true -known_third_party = ["Crypto", "PySide6", "coloredlogs", "constants", "dataclasses_json", "ffmpeg", "m3u8", "mutagen", "pathvalidate", "requests", "rich", "tidalapi", "toml", "typer"] +known_third_party = ["Crypto", "PySide6", "coloredlogs", "dataclasses_json", "ffmpeg", "m3u8", "mutagen", "pathvalidate", "requests", "rich", "tidalapi", "toml", "typer"] [tool.mypy] # https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index 10e8f68..f5b7404 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -11,7 +11,6 @@ from uuid import uuid4 import ffmpeg import m3u8 import requests -from constants import CHUNK_SIZE, COVER_NAME from requests.adapters import HTTPAdapter, Retry from requests.exceptions import HTTPError from rich.progress import Progress, TaskID @@ -20,7 +19,14 @@ from tidalapi.exceptions import TooManyRequests from tidalapi.media import AudioExtensions, Codec, Quality, StreamManifest, VideoExtensions from tidal_dl_ng.config import Settings -from tidal_dl_ng.constants import EXTENSION_LYRICS, REQUESTS_TIMEOUT_SEC, MediaType, QualityVideo +from tidal_dl_ng.constants import ( + CHUNK_SIZE, + COVER_NAME, + EXTENSION_LYRICS, + REQUESTS_TIMEOUT_SEC, + MediaType, + QualityVideo, +) from tidal_dl_ng.helper.decryption import decrypt_file, decrypt_security_token from tidal_dl_ng.helper.exceptions import MediaMissing from tidal_dl_ng.helper.path import check_file_exists, format_path_media, path_file_sanitize, url_to_filename