From 91c24f224bbd65fb78c1ca69a74d2babd04a2a3e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 8 Nov 2025 19:23:28 +0000 Subject: [PATCH] Check type is string --- torrent.py | 3 +++ video.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/torrent.py b/torrent.py index 7a6fd5606..cddbff3b6 100644 --- a/torrent.py +++ b/torrent.py @@ -36,6 +36,9 @@ def convert_torrent_to_note(base_dir: str, nickname: str, domain: str, if not post_json_object.get('type'): return None + if not isinstance(post_json_object['type'], str): + return None + if post_json_object['type'] != 'Torrent': return None diff --git a/video.py b/video.py index 53b254b58..98762f452 100644 --- a/video.py +++ b/video.py @@ -36,6 +36,9 @@ def convert_video_to_note(base_dir: str, nickname: str, domain: str, if not post_json_object.get('type'): return None + if not isinstance(post_json_object['type'], str): + return None + if post_json_object['type'] != 'Video': return None