mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
More miscellaneous fixes
This commit is contained in:
parent
19e7ed0cb7
commit
e80fcc13fc
@ -941,7 +941,10 @@ class Manifest(object):
|
||||
href = urlunparse(purl)
|
||||
path, frag = urldefrag(href)
|
||||
if not path:
|
||||
if frag:
|
||||
return '#'.join((self.href, frag))
|
||||
else:
|
||||
return self.href
|
||||
if '/' not in self.href:
|
||||
return href
|
||||
dirname = os.path.dirname(self.href)
|
||||
|
@ -102,6 +102,7 @@ class DetectStructure(object):
|
||||
play_order=self.oeb.toc.next_play_order())
|
||||
|
||||
|
||||
|
||||
def elem_to_link(self, item, elem, counter):
|
||||
text = u' '.join([t.strip() for t in elem.xpath('descendant::text()')])
|
||||
text = text[:100].strip()
|
||||
|
@ -158,6 +158,9 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
|
||||
def set_cover(self):
|
||||
row = self.formats.currentRow()
|
||||
fmt = self.formats.item(row)
|
||||
if fmt is None:
|
||||
if self.formats.count() == 1:
|
||||
fmt = self.formats.item(0)
|
||||
if fmt is None:
|
||||
error_dialog(self, _('No format selected'),
|
||||
_('No format selected')).exec_()
|
||||
|
Loading…
x
Reference in New Issue
Block a user