mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
sony driver: fix missing mime attribute when adding a new book
This commit is contained in:
parent
a1e85abb2f
commit
57ab9f1ba0
@ -428,8 +428,8 @@ class XMLCache(object):
|
|||||||
mime = MIME_MAP.get(ext, None)
|
mime = MIME_MAP.get(ext, None)
|
||||||
if mime is None:
|
if mime is None:
|
||||||
mime = guess_type('a.'+ext)[0]
|
mime = guess_type('a.'+ext)[0]
|
||||||
if mime is not None:
|
if mime is not None:
|
||||||
record.set('mime', mime)
|
record.set('mime', mime)
|
||||||
if 'sourceid' not in record.attrib:
|
if 'sourceid' not in record.attrib:
|
||||||
record.set('sourceid', '1')
|
record.set('sourceid', '1')
|
||||||
if 'id' not in record.attrib:
|
if 'id' not in record.attrib:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user