From 67c69290f06371758d6e61489412b26bf2752c66 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 26 Feb 2024 06:53:53 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Check=20if=20song=20is=20available?= =?UTF-8?q?=20before=20download.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/download.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index 2c15c5b..bac9e88 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -190,6 +190,14 @@ class Download: elif not media: raise MediaMissing + # Check if media is available not deactivated / removed from TIDAL. + if not media.available: + self.fn_logger.info( + f"This track is not available for listening anymore on TIDAL. Skipping: {name_builder_item(media)}" + ) + + return False, "" + # If video download is not allowed end here if not video_download and isinstance(media, Video): self.fn_logger.info(