mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-28 14:04:49 -04:00
Fix #138
This commit is contained in:
parent
4f96dc95b5
commit
767e3c844e
1 changed files with 12 additions and 7 deletions
|
@ -253,7 +253,7 @@ class Track(Media):
|
||||||
|
|
||||||
self.path = os.path.join(gettempdir(), f"{hash(self.id)}_{self.quality}.tmp")
|
self.path = os.path.join(gettempdir(), f"{hash(self.id)}_{self.quality}.tmp")
|
||||||
|
|
||||||
def download(
|
def download( # noqa
|
||||||
self,
|
self,
|
||||||
quality: int = 3,
|
quality: int = 3,
|
||||||
parent_folder: str = "StreamripDownloads",
|
parent_folder: str = "StreamripDownloads",
|
||||||
|
@ -549,7 +549,7 @@ class Track(Media):
|
||||||
cover_url=cover_url,
|
cover_url=cover_url,
|
||||||
)
|
)
|
||||||
|
|
||||||
def tag(
|
def tag( # noqa
|
||||||
self,
|
self,
|
||||||
album_meta: dict = None,
|
album_meta: dict = None,
|
||||||
cover: Union[Picture, APIC, MP4Cover] = None,
|
cover: Union[Picture, APIC, MP4Cover] = None,
|
||||||
|
@ -1888,7 +1888,7 @@ class Artist(Tracklist, Media):
|
||||||
>>> artist.download()
|
>>> artist.download()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
downloaded_ids: set = set()
|
downloaded_ids: set
|
||||||
|
|
||||||
def __init__(self, client: Client, **kwargs):
|
def __init__(self, client: Client, **kwargs):
|
||||||
"""Create a new Artist object.
|
"""Create a new Artist object.
|
||||||
|
@ -1899,6 +1899,7 @@ class Artist(Tracklist, Media):
|
||||||
:param kwargs:
|
:param kwargs:
|
||||||
"""
|
"""
|
||||||
self.client = client
|
self.client = client
|
||||||
|
self.downloaded_ids = set()
|
||||||
|
|
||||||
for k, v in kwargs.items():
|
for k, v in kwargs.items():
|
||||||
setattr(self, k, v)
|
setattr(self, k, v)
|
||||||
|
@ -2008,10 +2009,14 @@ class Artist(Tracklist, Media):
|
||||||
|
|
||||||
kwargs.pop("parent_folder")
|
kwargs.pop("parent_folder")
|
||||||
# always an Album
|
# always an Album
|
||||||
item.download(
|
try:
|
||||||
parent_folder=self.folder,
|
item.download(
|
||||||
**kwargs,
|
parent_folder=self.folder,
|
||||||
)
|
**kwargs,
|
||||||
|
)
|
||||||
|
except PartialFailure:
|
||||||
|
pass
|
||||||
|
|
||||||
self.downloaded_ids.update(item.downloaded_ids)
|
self.downloaded_ids.update(item.downloaded_ids)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue