From 3182660338f6de5eafc46a88a19f1a57edef0ff0 Mon Sep 17 00:00:00 2001 From: nathom Date: Fri, 26 Mar 2021 10:40:09 -0700 Subject: [PATCH] Fix bug where year is None on tidal --- streamrip/downloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/streamrip/downloader.py b/streamrip/downloader.py index f4237e7..5d8f7d1 100644 --- a/streamrip/downloader.py +++ b/streamrip/downloader.py @@ -40,7 +40,6 @@ from .utils import ( logger = logging.getLogger(__name__) -# TODO: add the other quality options TIDAL_Q_MAP = { "LOW": 4, "HIGH": 5, @@ -265,6 +264,7 @@ class Track: the TrackMetadata object. """ formatter = self.meta.get_formatter() + logger.debug("Track meta formatter %s", pformat(formatter)) # filename = sanitize_filepath(self.file_format.format(**formatter)) filename = clean_format(self.file_format, formatter) self.final_path = ( @@ -699,7 +699,7 @@ class Album(Tracklist): "title": resp.get("title"), "_artist": safe_get(resp, "artist", "name"), "albumartist": safe_get(resp, "artist", "name"), - "year": str(resp.get("year"))[:4], + "year": resp.get("releaseDate")[:4], "version": resp.get("version"), "cover_urls": { size: tidal_cover_url(resp.get("cover"), x)