X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6d42bc478e3d1bd90eb294464748c21e4de0fc63..1a6ad5b9b48a5efa90410fd324c256f59f57e08f:/src/catalogue/models/book.py?ds=inline diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 9116a4657..5dbda4770 100644 --- 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