mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #466
This commit is contained in:
parent
98ab7260ec
commit
cb7c0609be
@ -68,7 +68,8 @@ def get_metadata(stream):
|
||||
""" Return metadata as a L{MetaInfo} object """
|
||||
stream.seek(0)
|
||||
if stream.read(5) != r'{\rtf':
|
||||
raise Exception('Not a valid RTF file')
|
||||
name = stream.name if hasattr(stream, 'name') else repr(stream)
|
||||
raise Exception('Not a valid RTF file: '+name)
|
||||
block = get_document_info(stream)[0]
|
||||
if not block:
|
||||
return MetaInformation(None, None)
|
||||
|
@ -247,7 +247,10 @@
|
||||
<item row="2" column="0" >
|
||||
<widget class="QCheckBox" name="gui_use_metadata_cover" >
|
||||
<property name="text" >
|
||||
<string>Use &metadata cover</string>
|
||||
<string>Use cover from &source file</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -923,8 +926,8 @@
|
||||
<property name="html" >
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';"></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user