👷 Code style.
This commit is contained in:
@@ -334,7 +334,9 @@ class Download:
|
|||||||
if media_id and media_type:
|
if media_id and media_type:
|
||||||
# If no media instance is provided, we need to create the media instance.
|
# If no media instance is provided, we need to create the media instance.
|
||||||
media = instantiate_media(self.session, media_type, media_id)
|
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:
|
if not media.available:
|
||||||
self.fn_logger.info(
|
self.fn_logger.info(
|
||||||
f"This item is not available for listening anymore on TIDAL. Skipping: {name_builder_item(media)}"
|
f"This item is not available for listening anymore on TIDAL. Skipping: {name_builder_item(media)}"
|
||||||
|
|||||||
@@ -277,8 +277,7 @@ def path_file_uniquify(path_file: pathlib.Path) -> pathlib.Path:
|
|||||||
# For most OS filename has a character limit of 255.
|
# For most OS filename has a character limit of 255.
|
||||||
path_file = (
|
path_file = (
|
||||||
path_file.parent / (str(path_file.stem)[: -len(file_suffix)] + file_suffix)
|
path_file.parent / (str(path_file.stem)[: -len(file_suffix)] + file_suffix)
|
||||||
if len(str(path_file.parent / (path_file.stem + unique_suffix)))
|
if len(str(path_file.parent / (path_file.stem + unique_suffix))) > FILENAME_LENGTH_MAX
|
||||||
> FILENAME_LENGTH_MAX
|
|
||||||
else path_file.parent / (path_file.stem + unique_suffix)
|
else path_file.parent / (path_file.stem + unique_suffix)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user