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'),
|
'com': _('US'),
|
||||||
'fr' : _('France'),
|
'fr' : _('France'),
|
||||||
'de' : _('Germany'),
|
'de' : _('Germany'),
|
||||||
|
'uk' : _('UK'),
|
||||||
}
|
}
|
||||||
|
|
||||||
def create_query(self, log, title=None, authors=None, identifiers={}): # {{{
|
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
|
url = None
|
||||||
asin = identifiers.get('amazon', None)
|
asin = identifiers.get('amazon', None)
|
||||||
if asin is None:
|
if asin is None:
|
||||||
@ -344,6 +345,7 @@ class Amazon(Source):
|
|||||||
url = self.cached_identifier_to_cover_url(asin)
|
url = self.cached_identifier_to_cover_url(asin)
|
||||||
|
|
||||||
return url
|
return url
|
||||||
|
# }}}
|
||||||
|
|
||||||
def identify(self, log, result_queue, abort, title=None, authors=None, # {{{
|
def identify(self, log, result_queue, abort, title=None, authors=None, # {{{
|
||||||
identifiers={}, timeout=30):
|
identifiers={}, timeout=30):
|
||||||
@ -442,8 +444,7 @@ class Amazon(Source):
|
|||||||
return None
|
return None
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
if __name__ == '__main__': # tests {{{
|
||||||
if __name__ == '__main__':
|
|
||||||
# To run these test use: calibre-debug -e
|
# To run these test use: calibre-debug -e
|
||||||
# src/calibre/ebooks/metadata/sources/amazon.py
|
# src/calibre/ebooks/metadata/sources/amazon.py
|
||||||
from calibre.ebooks.metadata.sources.test import (test_identify_plugin,
|
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]
|
self.__token_info = line[:16]
|
||||||
action = self.__state_dict.get(self.__state)
|
action = self.__state_dict.get(self.__state)
|
||||||
if action is None:
|
if action is None:
|
||||||
sys.stderr.write('no matching state in module fonts.py\n')
|
try:
|
||||||
sys.stderr.write(self.__state + '\n')
|
sys.stderr.write('no matching state in module fonts.py\n')
|
||||||
|
sys.stderr.write(self.__state + '\n')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
action(line)
|
action(line)
|
||||||
copy_obj = copy.Copy(bug_handler = self.__bug_handler)
|
copy_obj = copy.Copy(bug_handler = self.__bug_handler)
|
||||||
if self.__copy:
|
if self.__copy:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user