mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-15 15:44:58 -04:00
Formatting
This commit is contained in:
parent
297ff216b2
commit
418e9544b1
3 changed files with 24 additions and 15 deletions
|
@ -637,6 +637,7 @@ class ConvertCommand(Command):
|
||||||
concurrent.futures.as_completed(futures),
|
concurrent.futures.as_completed(futures),
|
||||||
total=len(futures),
|
total=len(futures),
|
||||||
desc="Converting",
|
desc="Converting",
|
||||||
|
unit="track",
|
||||||
bar_format=TQDM_BAR_FORMAT,
|
bar_format=TQDM_BAR_FORMAT,
|
||||||
):
|
):
|
||||||
# Only show loading bar
|
# Only show loading bar
|
||||||
|
|
|
@ -659,9 +659,13 @@ class Track(Media):
|
||||||
audio[k] = v
|
audio[k] = v
|
||||||
|
|
||||||
if embed_cover and cover is None:
|
if embed_cover and cover is None:
|
||||||
cover = Tracklist.get_cover_obj(
|
cover = (
|
||||||
|
Tracklist.get_cover_obj(
|
||||||
self.cover_path, self.container, self.client.source
|
self.cover_path, self.container, self.client.source
|
||||||
) if hasattr(self,"cover_path") else None
|
)
|
||||||
|
if hasattr(self, "cover_path")
|
||||||
|
else None
|
||||||
|
)
|
||||||
|
|
||||||
if isinstance(audio, FLAC):
|
if isinstance(audio, FLAC):
|
||||||
if embed_cover and cover:
|
if embed_cover and cover:
|
||||||
|
@ -1521,7 +1525,8 @@ class Album(Tracklist, Media):
|
||||||
|
|
||||||
self.download_message()
|
self.download_message()
|
||||||
|
|
||||||
cover_path = _choose_and_download_cover(
|
cover_path = (
|
||||||
|
_choose_and_download_cover(
|
||||||
self.cover_urls,
|
self.cover_urls,
|
||||||
kwargs.get("embed_cover_size", "large"),
|
kwargs.get("embed_cover_size", "large"),
|
||||||
self.folder,
|
self.folder,
|
||||||
|
@ -1530,7 +1535,10 @@ class Album(Tracklist, Media):
|
||||||
kwargs.get("max_artwork_width", 1e9),
|
kwargs.get("max_artwork_width", 1e9),
|
||||||
kwargs.get("max_artwork_height", 1e9),
|
kwargs.get("max_artwork_height", 1e9),
|
||||||
),
|
),
|
||||||
) if self.cover_urls else None
|
)
|
||||||
|
if self.cover_urls
|
||||||
|
else None
|
||||||
|
)
|
||||||
|
|
||||||
if cover_path and kwargs.get("embed_cover", True): # embed by default
|
if cover_path and kwargs.get("embed_cover", True): # embed by default
|
||||||
logger.debug("Getting cover_obj from %s", cover_path)
|
logger.debug("Getting cover_obj from %s", cover_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue