mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Also ignore unparseable metadata.json
This commit is contained in:
parent
67ad60d536
commit
46406ca9a7
@ -2107,8 +2107,13 @@ class DB:
|
|||||||
for f in os.scandir(x.path):
|
for f in os.scandir(x.path):
|
||||||
if f.is_file(follow_symlinks=False):
|
if f.is_file(follow_symlinks=False):
|
||||||
if f.name == 'metadata.json':
|
if f.name == 'metadata.json':
|
||||||
with open(f.path, 'rb') as mf:
|
try:
|
||||||
metadata = json.loads(mf.read())
|
with open(f.path, 'rb') as mf:
|
||||||
|
metadata = json.loads(mf.read())
|
||||||
|
except Exception:
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
formats.add(f.name.upper())
|
formats.add(f.name.upper())
|
||||||
if formats:
|
if formats:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user