X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/63f861861578b33416a0b2d801252b27443fabde..fe14330cee64ab56c479ff83a4eb29a214c68d8f:/src/catalogue/models/book.py?ds=sidebyside diff --git a/src/catalogue/models/book.py b/src/catalogue/models/book.py index 140ba50f9..12fdb8d3d 100644 --- a/src/catalogue/models/book.py +++ b/src/catalogue/models/book.py @@ -195,6 +195,9 @@ class Book(models.Model): else: return self.media.filter(type=type_).exists() + def has_audio(self): + return self.has_media('mp3') + def get_media(self, type_): if self.has_media(type_): if type_ in Book.formats: