mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
da20ff6502
commit
0e6557fe43
@ -284,6 +284,7 @@ class Amazon(Source):
|
||||
'com': _('US'),
|
||||
'fr' : _('France'),
|
||||
'de' : _('Germany'),
|
||||
'uk' : _('UK'),
|
||||
}
|
||||
|
||||
def create_query(self, log, title=None, authors=None, identifiers={}): # {{{
|
||||
@ -331,7 +332,7 @@ class Amazon(Source):
|
||||
|
||||
# }}}
|
||||
|
||||
def get_cached_cover_url(self, identifiers):
|
||||
def get_cached_cover_url(self, identifiers): # {{{
|
||||
url = None
|
||||
asin = identifiers.get('amazon', None)
|
||||
if asin is None:
|
||||
@ -344,6 +345,7 @@ class Amazon(Source):
|
||||
url = self.cached_identifier_to_cover_url(asin)
|
||||
|
||||
return url
|
||||
# }}}
|
||||
|
||||
def identify(self, log, result_queue, abort, title=None, authors=None, # {{{
|
||||
identifiers={}, timeout=30):
|
||||
@ -442,8 +444,7 @@ class Amazon(Source):
|
||||
return None
|
||||
# }}}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == '__main__': # tests {{{
|
||||
# To run these test use: calibre-debug -e
|
||||
# src/calibre/ebooks/metadata/sources/amazon.py
|
||||
from calibre.ebooks.metadata.sources.test import (test_identify_plugin,
|
||||
@ -489,5 +490,5 @@ if __name__ == '__main__':
|
||||
),
|
||||
|
||||
])
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -245,8 +245,11 @@ class Colors:
|
||||
self.__token_info = line[:16]
|
||||
action = self.__state_dict.get(self.__state)
|
||||
if action is None:
|
||||
sys.stderr.write('no matching state in module fonts.py\n')
|
||||
sys.stderr.write(self.__state + '\n')
|
||||
try:
|
||||
sys.stderr.write('no matching state in module fonts.py\n')
|
||||
sys.stderr.write(self.__state + '\n')
|
||||
except:
|
||||
pass
|
||||
action(line)
|
||||
copy_obj = copy.Copy(bug_handler = self.__bug_handler)
|
||||
if self.__copy:
|
||||
|
Loading…
x
Reference in New Issue
Block a user