Skip to content

Commit

Permalink
Merge pull request #1339 from DoobesURU/LinkingBookCover
Browse files Browse the repository at this point in the history
Fix Linking Book cover function
  • Loading branch information
Hoikas authored Nov 15, 2024
2 parents a79c788 + a717fd0 commit 801d482
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Scripts/Python/xLinkingBookGUIPopup.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,8 @@ def IShowBookNoTreasure(self):
gLinkingBook = ptBook(bookdef,self.key)
gLinkingBook.setSize( width, height )
# make sure there is a cover to show
if not showOpen:
if not self.IsThereACover(bookdef):
showOpen = 1
if showOpen and not self.IsThereACover(bookdef):
showOpen = 0
gLinkingBook.setGUI(gui)
gLinkingBook.show(showOpen)
except LookupError:
Expand Down Expand Up @@ -869,7 +868,7 @@ def IAddShare(self):
def IsThereACover(self,bookHtml):
# search the bookhtml string looking for a cover
idx = bookHtml.find('<cover')
if idx > 0:
if idx >= 0:
return 1
return 0

Expand Down

0 comments on commit 801d482

Please sign in to comment.