From 6c47ac514a79923b1f1701874624d383f398ed16 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 28 Jul 2021 14:41:29 +0200 Subject: [PATCH] Minor fix for duration tag. --- src/archive/templatetags/tags.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/archive/templatetags/tags.py b/src/archive/templatetags/tags.py index 2acc8b1..0fa23ac 100755 --- a/src/archive/templatetags/tags.py +++ b/src/archive/templatetags/tags.py @@ -39,7 +39,10 @@ def status(audiobook, format): @register.filter def duration(s): - h = int(s / 3600) + try: + h = int(s / 3600) + except: + return s s %= 3600 m = int(s / 60) s %= 60 -- 2.20.1