diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 02ea10e..f65611f 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1000,7 +1000,9 @@ class Media(models.Model): def duration(self): field = self.get_metadata_field('duration') duration = self.loaded_metadata.get(field, 0) - if not isinstance(duration, int): + try: + duration = int(duration) + except ValueError: duration = 0 return duration