mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Change server to use a getter for isbn instead of data[FIELD_MAP]
This commit is contained in:
parent
5d317eb534
commit
be4984f492
@ -89,13 +89,16 @@ class XMLServer(object):
|
|||||||
for x in ('id', 'title', 'sort', 'author_sort', 'rating', 'size'):
|
for x in ('id', 'title', 'sort', 'author_sort', 'rating', 'size'):
|
||||||
kwargs[x] = serialize(record[FM[x]])
|
kwargs[x] = serialize(record[FM[x]])
|
||||||
|
|
||||||
for x in ('isbn', 'formats', 'series', 'tags', 'publisher',
|
for x in ('formats', 'series', 'tags', 'publisher',
|
||||||
'comments'):
|
'comments'):
|
||||||
y = record[FM[x]]
|
y = record[FM[x]]
|
||||||
if x == 'tags':
|
if x == 'tags':
|
||||||
y = format_tag_string(y, ',', ignore_max=True)
|
y = format_tag_string(y, ',', ignore_max=True)
|
||||||
kwargs[x] = serialize(y) if y else ''
|
kwargs[x] = serialize(y) if y else ''
|
||||||
|
|
||||||
|
isbn = self.db.isbn(record[FM['id']], index_is_id=True)
|
||||||
|
kwargs['isbn'] = serialize(isbn if isbn else '')
|
||||||
|
|
||||||
kwargs['safe_title'] = ascii_filename(kwargs['title'])
|
kwargs['safe_title'] = ascii_filename(kwargs['title'])
|
||||||
|
|
||||||
c = kwargs.pop('comments')
|
c = kwargs.pop('comments')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user