diff --git a/rip/cli.py b/rip/cli.py index d2be5f5..fe2154c 100644 --- a/rip/cli.py +++ b/rip/cli.py @@ -637,6 +637,7 @@ class ConvertCommand(Command): concurrent.futures.as_completed(futures), total=len(futures), desc="Converting", + unit="track", bar_format=TQDM_BAR_FORMAT, ): # Only show loading bar diff --git a/streamrip/media.py b/streamrip/media.py index 0bd27d4..0398ac7 100644 --- a/streamrip/media.py +++ b/streamrip/media.py @@ -659,9 +659,13 @@ class Track(Media): audio[k] = v if embed_cover and cover is None: - cover = Tracklist.get_cover_obj( - self.cover_path, self.container, self.client.source - ) if hasattr(self,"cover_path") else None + cover = ( + Tracklist.get_cover_obj( + self.cover_path, self.container, self.client.source + ) + if hasattr(self, "cover_path") + else None + ) if isinstance(audio, FLAC): if embed_cover and cover: @@ -1521,16 +1525,20 @@ class Album(Tracklist, Media): self.download_message() - cover_path = _choose_and_download_cover( - self.cover_urls, - kwargs.get("embed_cover_size", "large"), - self.folder, - kwargs.get("keep_hires_cover", True), - ( - kwargs.get("max_artwork_width", 1e9), - kwargs.get("max_artwork_height", 1e9), - ), - ) if self.cover_urls else None + cover_path = ( + _choose_and_download_cover( + self.cover_urls, + kwargs.get("embed_cover_size", "large"), + self.folder, + kwargs.get("keep_hires_cover", True), + ( + kwargs.get("max_artwork_width", 1e9), + kwargs.get("max_artwork_height", 1e9), + ), + ) + if self.cover_urls + else None + ) if cover_path and kwargs.get("embed_cover", True): # embed by default logger.debug("Getting cover_obj from %s", cover_path) diff --git a/streamrip/utils.py b/streamrip/utils.py index 82f8a6d..e9ccf90 100644 --- a/streamrip/utils.py +++ b/streamrip/utils.py @@ -178,9 +178,9 @@ def tidal_cover_url(uuid, size): """ possibles = (80, 160, 320, 640, 1280) assert size in possibles, f"size must be in {possibles}" - + # A common occurance is a valid size but no uuid - if not uuid: + if not uuid: return None return TIDAL_COVER_URL.format(uuid=uuid.replace("-", "/"), height=size, width=size)