fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Minor club fixes.
[wolnelektury.git]
/
src
/
catalogue
/
models
/
book.py
diff --git
a/src/catalogue/models/book.py
b/src/catalogue/models/book.py
index
9116a46
..
5dbda47
100644
(file)
--- a/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@
-237,6
+237,12
@@
class Book(models.Model):
@staticmethod
def format_audio_length(seconds):
+ """
+ >>> Book.format_audio_length(1)
+ '0:01'
+ >>> Book.format_audio_length(3661)
+ '1:01:01'
+ """
if seconds < 60*60:
minutes = seconds // 60
seconds = seconds % 60