mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Handle periods better when reading metadata from filenames
This commit is contained in:
parent
2708065870
commit
b23b32a7ea
@ -108,7 +108,7 @@ def set_metadata(stream, mi, stream_type='lrf'):
|
||||
|
||||
|
||||
def metadata_from_filename(name, pat=None):
|
||||
name = os.path.splitext(name)[0]
|
||||
name = name.rpartition('.')[0]
|
||||
mi = MetaInformation(None, None)
|
||||
if pat is None:
|
||||
pat = re.compile(prefs.get('filename_pattern'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user