fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37e0aba
)
minor fixes for images in epub/mobi
author
Jan Szejko
<j-sz@o2.pl>
Wed, 16 Mar 2016 11:39:43 +0000
(12:39 +0100)
committer
Jan Szejko
<j-sz@o2.pl>
Wed, 16 Mar 2016 11:39:43 +0000
(12:39 +0100)
lib/librarian
patch
|
blob
|
history
src/catalogue/models/book.py
patch
|
blob
|
history
diff --git
a/lib/librarian
b/lib/librarian
index
6d1ec86
..
5085131
160000
(submodule)
--- a/
lib/librarian
+++ b/
lib/librarian
@@
-1
+1
@@
-Subproject commit
6d1ec864ca2ec59a74afe0f025134fdd18e4f5b5
+Subproject commit
50851315ec74af3cad225137935de36904c4c29b
diff --git
a/src/catalogue/models/book.py
b/src/catalogue/models/book.py
index
6e66f2e
..
a4017fb
100644
(file)
--- a/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@
-247,6
+247,10
@@
class Book(models.Model):
def download_pictures(self, remote_gallery_url):
gallery_path = self.gallery_path()
+ # delete previous files, so we don't include old files in ebooks
+ for filename in os.listdir(gallery_path):
+ file_path = os.path.join(gallery_path, filename)
+ os.unlink(file_path)
ilustr_elements = list(self.wldocument().edoc.findall('//ilustr'))
if ilustr_elements:
makedirs(gallery_path)