mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 05:08:55 +02:00
Store: use attrgetter
This commit is contained in:
parent
fd5bd49c74
commit
cc9a15e116
1 changed files with 3 additions and 3 deletions
|
|
@ -671,9 +671,9 @@ def get_matches(self, location, query):
|
|||
locations = all_locs if location == 'all' else [location]
|
||||
q = {
|
||||
'author': lambda x: x.author.lower(),
|
||||
'cover': lambda x: x.cover_url,
|
||||
'drm': lambda x: x.drm,
|
||||
'format': lambda x: x.formats,
|
||||
'cover': attrgetter('cover_url'),
|
||||
'drm': attrgetter('drm'),
|
||||
'format': attrgetter('formats'),
|
||||
'price': lambda x: comparable_price(x.price),
|
||||
'store': lambda x: x.store_name.lower(),
|
||||
'title': lambda x: x.title.lower(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue