mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix #7054 (Issue while importing book where isbn is present in file name)
This commit is contained in:
parent
2c788d8385
commit
6c8746bed9
@ -114,7 +114,8 @@ SC_COPYABLE_FIELDS = SOCIAL_METADATA_FIELDS.union(
|
|||||||
PUBLICATION_METADATA_FIELDS).union(
|
PUBLICATION_METADATA_FIELDS).union(
|
||||||
BOOK_STRUCTURE_FIELDS).union(
|
BOOK_STRUCTURE_FIELDS).union(
|
||||||
DEVICE_METADATA_FIELDS).union(
|
DEVICE_METADATA_FIELDS).union(
|
||||||
CALIBRE_METADATA_FIELDS) - \
|
CALIBRE_METADATA_FIELDS).union(
|
||||||
|
TOP_LEVEL_CLASSIFIERS) - \
|
||||||
SC_FIELDS_NOT_COPIED.union(
|
SC_FIELDS_NOT_COPIED.union(
|
||||||
SC_FIELDS_COPY_NOT_NULL)
|
SC_FIELDS_COPY_NOT_NULL)
|
||||||
|
|
||||||
|
@ -108,7 +108,8 @@ def _get_metadata(stream, stream_type, use_libprs_metadata,
|
|||||||
base = metadata_from_filename(name, pat=pattern)
|
base = metadata_from_filename(name, pat=pattern)
|
||||||
if force_read_metadata or is_recipe(name) or prefs['read_file_metadata']:
|
if force_read_metadata or is_recipe(name) or prefs['read_file_metadata']:
|
||||||
mi = get_file_type_metadata(stream, stream_type)
|
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.is_null('authors') and base.is_null('isbn'):
|
||||||
# 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.
|
||||||
# The regex is meant to match the standard format filenames are written
|
# The regex is meant to match the standard format filenames are written
|
||||||
|
Loading…
x
Reference in New Issue
Block a user