From 4b7f47bc0a7958ff78ad9315456a1379175c0332 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 26 Feb 2024 06:48:11 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Download=20check=20?= =?UTF-8?q?on=20video=20download=20deactivated=20fix.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index 7490753..2c15c5b 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -191,7 +191,7 @@ class Download: raise MediaMissing # If video download is not allowed end here - if not video_download: + if not video_download and isinstance(media, Video): self.fn_logger.info( f"Video downloads are deactivated (see settings). Skipping video: {name_builder_item(media)}" ) From 67c69290f06371758d6e61489412b26bf2752c66 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 26 Feb 2024 06:53:53 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=A8=20Check=20if=20song=20is=20availa?= =?UTF-8?q?ble=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( From 87626d64c590a30f391e6bf1779ca39008a22ff8 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 26 Feb 2024 07:02:02 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=A8=20Do=20not=20display=20unavailabl?= =?UTF-8?q?e=20search=20results.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/gui.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tidal_dl_ng/gui.py b/tidal_dl_ng/gui.py index 2d2118d..6c904d7 100644 --- a/tidal_dl_ng/gui.py +++ b/tidal_dl_ng/gui.py @@ -357,6 +357,10 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): result = [] for idx, item in enumerate(items): + # Check if item is available on TIDAL. + if hasattr(item, "available") and not item.available: + continue + if isinstance(item, Track): result_item: ResultItem = ResultItem( position=idx,