From f134c9b9fdac3d7b397e699785c3f121aef5c40f Mon Sep 17 00:00:00 2001 From: nathom Date: Thu, 13 May 2021 19:00:16 -0700 Subject: [PATCH] Skip cover if already downloaded #72 --- streamrip/tracklists.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/streamrip/tracklists.py b/streamrip/tracklists.py index a154aaeb..0180c409 100644 --- a/streamrip/tracklists.py +++ b/streamrip/tracklists.py @@ -157,7 +157,11 @@ def _prepare_download(self, **kwargs): self.cover_obj = None # Download the booklet if applicable - if self.get("booklets") and kwargs.get("download_booklets", True): + if ( + self.get("booklets") + and kwargs.get("download_booklets", True) + and not any(f.endswith(".pdf") for f in os.listdir(self.folder)) + ): click.secho("\nDownloading booklets", fg="blue") for item in self.booklets: Booklet(item).download(parent_folder=self.folder)