X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5e225c00376442bb28231d98472935a79dc9c9a5..79d770e03bde9d600ec6effdcc9c15487ff23897:/src/catalogue/fields.py?ds=sidebyside diff --git a/src/catalogue/fields.py b/src/catalogue/fields.py index 1a3a3b5d7..5b49307a3 100644 --- a/src/catalogue/fields.py +++ b/src/catalogue/fields.py @@ -130,7 +130,15 @@ class BuildPdf(BuildEbook): class BuildEpub(BuildEbook): @staticmethod def transform(wldoc, fieldfile): - return wldoc.as_epub(cover=True) + return wldoc.as_epub(cover=True, ilustr_path=gallery_path(wldoc.book_info.url.slug)) + + +@BuildEbook.register('mobi') +@task(ignore_result=True) +class BuildMobi(BuildEbook): + @staticmethod + def transform(wldoc, fieldfile): + return wldoc.as_mobi(cover=True, ilustr_path=gallery_path(wldoc.book_info.url.slug)) @BuildEbook.register('html')