From 1f30abe0c6fc0d568b1e444cc090c4f84aa6f7fb Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 25 Jun 2021 16:10:03 +0200 Subject: [PATCH] Omit part name on yt thumbnail if only one part. --- src/youtube/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/youtube/models.py b/src/youtube/models.py index 76a02b9..35899b6 100644 --- a/src/youtube/models.py +++ b/src/youtube/models.py @@ -243,7 +243,7 @@ class ThumbnailTemplate(models.Model): { "author": ', '.join((a['name'] for a in audiobook.book['authors'])), "title": title, - "part": (audiobook.youtube_volume or audiobook.part_name).strip(), + "part": (audiobook.youtube_volume or audiobook.part_name).strip() if audiobook.youtube_volume_count > 1 else '', }, lambda name: Font.objects.get(name=name).truetype.path ) -- 2.20.1