mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a comment about not using the Metadata class, and why
This commit is contained in:
parent
b603a761fb
commit
0ba513e287
@ -199,6 +199,10 @@ class MobileServer(object):
|
||||
CKEYS = [key for key in sorted(CFM.get_custom_fields(),
|
||||
cmp=lambda x,y: cmp(CFM[x]['name'].lower(),
|
||||
CFM[y]['name'].lower()))]
|
||||
# This method uses its own book dict, not the Metadata dict. The loop
|
||||
# below could be changed to use db.get_metadata instead of reading
|
||||
# info directly from the record made by the view, but it doesn't seem
|
||||
# worth it at the moment.
|
||||
books = []
|
||||
for record in items[(start-1):(start-1)+num]:
|
||||
book = {'formats':record[FM['formats']], 'size':record[FM['size']]}
|
||||
|
@ -66,6 +66,10 @@ class XMLServer(object):
|
||||
return x.decode(preferred_encoding, 'replace')
|
||||
return unicode(x)
|
||||
|
||||
# This method uses its own book dict, not the Metadata dict. The loop
|
||||
# below could be changed to use db.get_metadata instead of reading
|
||||
# info directly from the record made by the view, but it doesn't seem
|
||||
# worth it at the moment.
|
||||
for record in items[start:start+num]:
|
||||
kwargs = {}
|
||||
aus = record[FM['authors']] if record[FM['authors']] else __builtin__._('Unknown')
|
||||
@ -138,6 +142,3 @@ class XMLServer(object):
|
||||
return etree.tostring(ans, encoding='utf-8', pretty_print=True,
|
||||
xml_declaration=True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user