mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -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):
|
||||
if f.is_file(follow_symlinks=False):
|
||||
if f.name == 'metadata.json':
|
||||
with open(f.path, 'rb') as mf:
|
||||
metadata = json.loads(mf.read())
|
||||
try:
|
||||
with open(f.path, 'rb') as mf:
|
||||
metadata = json.loads(mf.read())
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
continue
|
||||
else:
|
||||
formats.add(f.name.upper())
|
||||
if formats:
|
||||
|
Loading…
x
Reference in New Issue
Block a user