mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
ebook-meta: Ignore the read metadata from file contents setting
ebook-meta program: Ignore the adding books preference that controls the reading of metadata from file names vs. file contents.
This commit is contained in:
parent
e3231a6481
commit
f7250683a4
@ -31,7 +31,6 @@ silently ignored.
|
|||||||
''')
|
''')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def config():
|
def config():
|
||||||
c = StringConfig('')
|
c = StringConfig('')
|
||||||
c.add_opt('title', ['-t', '--title'],
|
c.add_opt('title', ['-t', '--title'],
|
||||||
@ -163,7 +162,7 @@ def main(args=sys.argv):
|
|||||||
if getattr(opts, pref.name) is not None:
|
if getattr(opts, pref.name) is not None:
|
||||||
trying_to_set = True
|
trying_to_set = True
|
||||||
break
|
break
|
||||||
mi = get_metadata(stream, stream_type)
|
mi = get_metadata(stream, stream_type, force_read_metadata=True)
|
||||||
if trying_to_set:
|
if trying_to_set:
|
||||||
prints(_('Original metadata')+'::')
|
prints(_('Original metadata')+'::')
|
||||||
metadata = unicode(mi)
|
metadata = unicode(mi)
|
||||||
@ -181,7 +180,7 @@ def main(args=sys.argv):
|
|||||||
if opts.lrf_bookid is not None:
|
if opts.lrf_bookid is not None:
|
||||||
lrf = LRFMetaFile(stream)
|
lrf = LRFMetaFile(stream)
|
||||||
lrf.book_id = opts.lrf_bookid
|
lrf.book_id = opts.lrf_bookid
|
||||||
mi = get_metadata(stream, stream_type)
|
mi = get_metadata(stream, stream_type, force_read_metadata=True)
|
||||||
prints('\n' + _('Changed metadata') + '::')
|
prints('\n' + _('Changed metadata') + '::')
|
||||||
metadata = unicode(mi)
|
metadata = unicode(mi)
|
||||||
metadata = '\t'+'\n\t'.join(metadata.split('\n'))
|
metadata = '\t'+'\n\t'.join(metadata.split('\n'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user