From 37df9b65c74609511fc588a3a004ccb737bce36d Mon Sep 17 00:00:00 2001 From: lamusmaser <1940060+lamusmaser@users.noreply.github.com> Date: Thu, 16 Nov 2023 19:16:09 -0700 Subject: [PATCH] Add `allowed_null_keys` and its dictionary for manual imports. (#595) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add `allowed_null_keys` and its dictionary for manual imports. * Fix linting for `allowed_null_keys` list. * Add missing trailing comma for linting. * Add missing newline that wasn't in earlier linting responses. * Clear empty text in newlines. * Remove newline that the linter requested because the linter now doesn't want it. ¯\_(ツ)_/¯ * Change default application from manual import to the video processing. * Fix missing space. --- tubearchivist/home/src/index/video.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tubearchivist/home/src/index/video.py b/tubearchivist/home/src/index/video.py index b4143506..7a997cf0 100644 --- a/tubearchivist/home/src/index/video.py +++ b/tubearchivist/home/src/index/video.py @@ -188,11 +188,11 @@ class YoutubeVideo(YouTubeItem, YoutubeSubtitle): # build json_data basics self.json_data = { "title": self.youtube_meta["title"], - "description": self.youtube_meta["description"], - "category": self.youtube_meta["categories"], + "description": self.youtube_meta.get("description", ""), + "category": self.youtube_meta.get("categories", []), "vid_thumb_url": self.youtube_meta["thumbnail"], "vid_thumb_base64": base64_blur, - "tags": self.youtube_meta["tags"], + "tags": self.youtube_meta.get("tags", []), "published": published, "vid_last_refresh": last_refresh, "date_downloaded": last_refresh,