mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #3567 (Entire text of books imported into Title & Author fields)
This commit is contained in:
parent
a49fe89309
commit
e114530a29
@ -22,6 +22,8 @@ def get_metadata(stream, extract_cover=True):
|
|||||||
else:
|
else:
|
||||||
mdata += line
|
mdata += line
|
||||||
|
|
||||||
|
mdata = mdata[:100]
|
||||||
|
|
||||||
mo = re.search('(?u)^[ ]*(?P<title>.+)[ ]*(\n{3}|(\r\n){3}|\r{3})[ ]*(?P<author>.+)[ ]*(\n|\r\n|\r)$', mdata)
|
mo = re.search('(?u)^[ ]*(?P<title>.+)[ ]*(\n{3}|(\r\n){3}|\r{3})[ ]*(?P<author>.+)[ ]*(\n|\r\n|\r)$', mdata)
|
||||||
if mo != None:
|
if mo != None:
|
||||||
mi.title = mo.group('title')
|
mi.title = mo.group('title')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user