mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Fix for always_use_existing_cover when oldcover name collides with dl image.
This commit is contained in:
parent
11f7c6f115
commit
e58df9ac97
1 changed files with 12 additions and 10 deletions
|
|
@ -551,16 +551,18 @@ div { margin: 0pt; padding: 0pt; }
|
|||
imgcount=0
|
||||
for imgmap in self.story.getImgUrls():
|
||||
imgfile = "OEBPS/"+imgmap['newsrc']
|
||||
outputepub.writestr(imgfile,imgmap['data'])
|
||||
items.append(("image%04d"%imgcount,
|
||||
imgfile,
|
||||
imgmap['mime'],
|
||||
None))
|
||||
imgcount+=1
|
||||
if 'cover' in imgfile:
|
||||
# make sure coverimgid is set to the cover, not
|
||||
# just the first image.
|
||||
coverimgid = items[-1][0]
|
||||
# don't overwrite old cover.
|
||||
if not self.use_oldcover or imgfile != oldcoverimghref:
|
||||
outputepub.writestr(imgfile,imgmap['data'])
|
||||
items.append(("image%04d"%imgcount,
|
||||
imgfile,
|
||||
imgmap['mime'],
|
||||
None))
|
||||
imgcount+=1
|
||||
if 'cover' in imgfile:
|
||||
# make sure coverimgid is set to the cover, not
|
||||
# just the first image.
|
||||
coverimgid = items[-1][0]
|
||||
|
||||
|
||||
items.append(("style","OEBPS/stylesheet.css","text/css",None))
|
||||
|
|
|
|||
Loading…
Reference in a new issue