From 0e74ac32d6223f5a05e73d9e468e0bceea682886 Mon Sep 17 00:00:00 2001 From: "E.J. Talevi" Date: Tue, 25 Nov 2025 23:56:56 -0300 Subject: Added clarity and grammar fixes to documentation and to some strings on the program itself. --- tidal_dl_ng/download.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tidal_dl_ng/download.py') diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index 33a23aa..a95f351 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -406,7 +406,7 @@ class Download: with path_file.open("wb") as f_target: for dl_segment_result in dl_segment_results: with dl_segment_result.path_segment.open("rb") as f_segment: - # Read and write junks, which gives better HDD write performance + # Read and write chunks, which gives better HDD write performance while segment := f_segment.read(CHUNK_SIZE): f_target.write(segment) @@ -1244,7 +1244,7 @@ class Download: response: requests.Response = requests.get(url, timeout=REQUESTS_TIMEOUT_SEC) result = response.content except Exception as e: - # TODO: Implement propper logging. + # TODO: Implement proper logging. print(e) finally: response.close() @@ -1253,7 +1253,7 @@ class Download: with open(path_file, "rb") as f: result = f.read() except OSError as e: - # TODO: Implement propper logging. + # TODO: Implement proper logging. print(e) return result -- cgit v1.3.1 From adfa0c6bb32ecdcd4eccaefaad2cd55676260d2d Mon Sep 17 00:00:00 2001 From: "E.J. Talevi" Date: Wed, 26 Nov 2025 04:42:29 -0300 Subject: fix(ffmpeg): prevent terminal window flash on Windows during media conversion --- .gitignore | 1 + tidal_dl_ng/download.py | 4 ++++ tidal_dl_ng/model/cfg.py | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'tidal_dl_ng/download.py') diff --git a/.gitignore b/.gitignore index 7b44eb7..b7c80af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ docs/source +vs_code/ # From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index 33a23aa..d9d0866 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -1692,6 +1692,8 @@ class Download: ffmpeg = ( FFmpeg(executable=self.settings.data.path_binary_ffmpeg) .option("y") + .option("hide_banner") + .option("nostdin") .input(url=path_file) .output(url=path_file_out, codec="copy", map=0, loglevel="quiet") ) @@ -1712,6 +1714,8 @@ class Download: path_media_out = path_media_src.with_suffix(AudioExtensions.FLAC) ffmpeg = ( FFmpeg(executable=self.settings.data.path_binary_ffmpeg) + .option("hide_banner") + .option("nostdin") .input(url=path_media_src) .output( url=path_media_out, diff --git a/tidal_dl_ng/model/cfg.py b/tidal_dl_ng/model/cfg.py index b43acc1..f687cd3 100644 --- a/tidal_dl_ng/model/cfg.py +++ b/tidal_dl_ng/model/cfg.py @@ -43,8 +43,8 @@ class Settings: cover_album_file: bool = True extract_flac: bool = True downloads_simultaneous_per_track_max: int = 20 - download_delay_sec_min: float = 3.0 - download_delay_sec_max: float = 5.0 + download_delay_sec_min: float = 1.0 + download_delay_sec_max: float = 3.0 album_track_num_pad_min: int = 1 downloads_concurrent_max: int = 3 symlink_to_track: bool = False -- cgit v1.3.1 From 4b9a4062d2e40c79c9c4d2892ce77602811052f5 Mon Sep 17 00:00:00 2001 From: "E.J. Talevi" Date: Wed, 26 Nov 2025 04:48:30 -0300 Subject: fix(ffmpeg): prevent terminal window flash on Windows during media conversion --- tidal_dl_ng/download.py | 10 ++++++++++ tidal_dl_ng/model/cfg.py | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'tidal_dl_ng/download.py') diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index d9d0866..6b04724 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -1689,6 +1689,9 @@ class Download: pathlib.Path: Path to the converted MP4 file. """ path_file_out: pathlib.Path = path_file.with_suffix(AudioExtensions.MP4) + + self.fn_logger.debug(f"Converting video: {path_file.name} -> {path_file_out.name}") + ffmpeg = ( FFmpeg(executable=self.settings.data.path_binary_ffmpeg) .option("y") @@ -1699,6 +1702,8 @@ class Download: ) ffmpeg.execute() + + self.fn_logger.debug(f"Video conversion complete: {path_file_out.name}") return path_file_out @@ -1712,6 +1717,9 @@ class Download: pathlib.Path: Path to the extracted FLAC file. """ path_media_out = path_media_src.with_suffix(AudioExtensions.FLAC) + + self.fn_logger.debug(f"Extracting FLAC: {path_media_src.name} -> {path_media_out.name}") + ffmpeg = ( FFmpeg(executable=self.settings.data.path_binary_ffmpeg) .option("hide_banner") @@ -1728,6 +1736,8 @@ class Download: ) ffmpeg.execute() + + self.fn_logger.debug(f"FLAC extraction complete: {path_media_out.name}") return path_media_out diff --git a/tidal_dl_ng/model/cfg.py b/tidal_dl_ng/model/cfg.py index f687cd3..b43acc1 100644 --- a/tidal_dl_ng/model/cfg.py +++ b/tidal_dl_ng/model/cfg.py @@ -43,8 +43,8 @@ class Settings: cover_album_file: bool = True extract_flac: bool = True downloads_simultaneous_per_track_max: int = 20 - download_delay_sec_min: float = 1.0 - download_delay_sec_max: float = 3.0 + download_delay_sec_min: float = 3.0 + download_delay_sec_max: float = 5.0 album_track_num_pad_min: int = 1 downloads_concurrent_max: int = 3 symlink_to_track: bool = False -- cgit v1.3.1