mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 06:06:07 +02:00
Read dc:contributor metadata from MOBI files
This commit is contained in:
parent
817f7aba60
commit
699f784071
2 changed files with 8 additions and 3 deletions
|
|
@ -151,6 +151,10 @@ def __init__(self, type_, data):
|
|||
117 : 'adult',
|
||||
118 : 'retailprice',
|
||||
119 : 'retailpricecurrency',
|
||||
121 : 'KF8 header section index',
|
||||
125 : 'KF8 resources (images/fonts) count',
|
||||
129 : 'KF8 cover URI',
|
||||
131 : 'KF8 unknown count',
|
||||
201 : 'coveroffset',
|
||||
202 : 'thumboffset',
|
||||
203 : 'hasfakecover',
|
||||
|
|
@ -169,9 +173,10 @@ def __init__(self, type_, data):
|
|||
503 : 'updatedtitle',
|
||||
}.get(self.type, repr(self.type))
|
||||
|
||||
if self.name in ('coveroffset', 'thumboffset', 'hasfakecover',
|
||||
if (self.name in {'coveroffset', 'thumboffset', 'hasfakecover',
|
||||
'Creator Major Version', 'Creator Minor Version',
|
||||
'Creator Build Number', 'Creator Software', 'startreading'):
|
||||
'Creator Build Number', 'Creator Software', 'startreading'} or
|
||||
self.type in {121, 125, 131}):
|
||||
self.data, = struct.unpack(b'>I', self.data)
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ def process_metadata(self, id, content, codec):
|
|||
except:
|
||||
pass
|
||||
elif id == 108:
|
||||
pass # Producer
|
||||
self.mi.book_producer = content.decode(codec, 'ignore').strip()
|
||||
elif id == 113:
|
||||
pass # ASIN or UUID
|
||||
elif id == 116:
|
||||
|
|
|
|||
Loading…
Reference in a new issue