catch typeerrors for duration metadata, resolves #248
This commit is contained in:
@@ -1059,7 +1059,7 @@ class Media(models.Model):
|
|||||||
duration = self.loaded_metadata.get(field, 0)
|
duration = self.loaded_metadata.get(field, 0)
|
||||||
try:
|
try:
|
||||||
duration = int(duration)
|
duration = int(duration)
|
||||||
except ValueError:
|
except (TypeError, ValueError):
|
||||||
duration = 0
|
duration = 0
|
||||||
return duration
|
return duration
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user