X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6d42bc478e3d1bd90eb294464748c21e4de0fc63..f39c00ef647a7f625d9bd61c570b89d7b9762c61:/src/catalogue/models/book.py?ds=sidebyside 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