mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-23 19:47:08 -04:00
Handle ItemExists in core.py
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
835c8d4cc6
commit
26cb32b9a4
2 changed files with 11 additions and 5 deletions
|
@ -207,10 +207,13 @@ class Track(Media):
|
|||
raise ItemExists(self.final_path)
|
||||
|
||||
if hasattr(self, "cover_url"):
|
||||
self.download_cover(
|
||||
width=kwargs.get("max_artwork_width", 999999),
|
||||
height=kwargs.get("max_artwork_height", 999999),
|
||||
) # only downloads for playlists and singles
|
||||
try:
|
||||
self.download_cover(
|
||||
width=kwargs.get("max_artwork_width", 999999),
|
||||
height=kwargs.get("max_artwork_height", 999999),
|
||||
) # only downloads for playlists and singles
|
||||
except ItemExists as e:
|
||||
logger.debug(e)
|
||||
|
||||
self.path = os.path.join(gettempdir(), f"{hash(self.id)}_{self.quality}.tmp")
|
||||
|
||||
|
@ -230,7 +233,6 @@ class Track(Media):
|
|||
:param progress_bar: turn on/off progress bar
|
||||
:type progress_bar: bool
|
||||
"""
|
||||
# raise NonStreamable
|
||||
self._prepare_download(
|
||||
quality=quality,
|
||||
parent_folder=parent_folder,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue