X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/63f861861578b33416a0b2d801252b27443fabde..3f7ea05878c9fa9ac9ff13211e48773ab6cf64eb:/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: