mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make use filename metadata only apply only to manually added books, not recipes
This commit is contained in:
parent
09fb99ab7e
commit
b5fb7d6c42
@ -84,11 +84,10 @@ def get_metadata(stream, stream_type='lrf', use_libprs_metadata=False):
|
|||||||
return opf
|
return opf
|
||||||
|
|
||||||
mi = MetaInformation(None, None)
|
mi = MetaInformation(None, None)
|
||||||
if prefs['read_file_metadata']:
|
|
||||||
mi = get_file_type_metadata(stream, stream_type)
|
|
||||||
|
|
||||||
name = os.path.basename(getattr(stream, 'name', ''))
|
name = os.path.basename(getattr(stream, 'name', ''))
|
||||||
base = metadata_from_filename(name)
|
base = metadata_from_filename(name)
|
||||||
|
if ((name.find('calibre') != -1 and name.find('recipe') != -1) or prefs['read_file_metadata']):
|
||||||
|
mi = get_file_type_metadata(stream, stream_type)
|
||||||
if base.title == os.path.splitext(name)[0] and base.authors is None:
|
if base.title == os.path.splitext(name)[0] and base.authors is None:
|
||||||
# Assume that there was no metadata in the file and the user set pattern
|
# Assume that there was no metadata in the file and the user set pattern
|
||||||
# to match meta info from the file name did not match.
|
# to match meta info from the file name did not match.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user