From b50e3bd14d8912e028257dfa36ff64e3e1908987 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 24 Mar 2025 09:01:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Code=20style.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/download.py | 4 +++- tidal_dl_ng/helper/path.py | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index 5e66f45..f5d9ad4 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -334,7 +334,9 @@ class Download: if media_id and media_type: # If no media instance is provided, we need to create the media instance. media = instantiate_media(self.session, media_type, media_id) - elif isinstance(media, Track) or isinstance(media, Video): # Check if media is available not deactivated / removed from TIDAL. + elif isinstance(media, Track) or isinstance( + media, Video + ): # Check if media is available not deactivated / removed from TIDAL. if not media.available: self.fn_logger.info( f"This item is not available for listening anymore on TIDAL. Skipping: {name_builder_item(media)}" diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index f138208..05ec547 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -277,8 +277,7 @@ def path_file_uniquify(path_file: pathlib.Path) -> pathlib.Path: # For most OS filename has a character limit of 255. path_file = ( path_file.parent / (str(path_file.stem)[: -len(file_suffix)] + file_suffix) - if len(str(path_file.parent / (path_file.stem + unique_suffix))) - > FILENAME_LENGTH_MAX + if len(str(path_file.parent / (path_file.stem + unique_suffix))) > FILENAME_LENGTH_MAX else path_file.parent / (path_file.stem + unique_suffix) )