From 55bfd911b9c683d080cb8aece2917f7da7227e16 Mon Sep 17 00:00:00 2001 From: meeb Date: Fri, 10 Mar 2023 18:23:49 +1100 Subject: [PATCH] catch typeerrors for duration metadata, resolves #248 --- tubesync/sync/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 0ecb0a6..35fcda1 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1059,7 +1059,7 @@ class Media(models.Model): duration = self.loaded_metadata.get(field, 0) try: duration = int(duration) - except ValueError: + except (TypeError, ValueError): duration = 0 return duration