mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-17 00:24:50 -04:00
Add support for last.fm playlists; #41
This commit is contained in:
parent
107fac4dcd
commit
af4aefe7ba
6 changed files with 71 additions and 7 deletions
|
@ -101,8 +101,8 @@ class TrackMetadata:
|
|||
self.label = resp.get("label")
|
||||
self.description = resp.get("description")
|
||||
self.disctotal = max(
|
||||
track.get("media_number", 1) for track in resp["tracks"]["items"]
|
||||
)
|
||||
track.get("media_number", 1) for track in safe_get(resp, 'tracks', 'items', default=[{}])
|
||||
) or 1
|
||||
self.explicit = resp.get("parental_warning", False)
|
||||
|
||||
if isinstance(self.label, dict):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue