fnp
/
audio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c890962
)
Minor fix for duration tag.
author
Radek Czajka
<rczajka@rczajka.pl>
Wed, 28 Jul 2021 12:41:29 +0000
(14:41 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Wed, 28 Jul 2021 12:41:29 +0000
(14:41 +0200)
src/archive/templatetags/tags.py
patch
|
blob
|
history
diff --git
a/src/archive/templatetags/tags.py
b/src/archive/templatetags/tags.py
index
2acc8b1
..
0fa23ac
100755
(executable)
--- 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):
@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
s %= 3600
m = int(s / 60)
s %= 60