Merge lp:~lifanxi/calibre/douban-metadata-plugin into lp:calibre

Proposed by Li Fanxi
Status: Merged
Merged at revision: 9363
Proposed branch: lp:~lifanxi/calibre/douban-metadata-plugin
Merge into: lp:calibre
Diff against target: 12 lines (+2/-0)
1 file modified
src/calibre/ebooks/metadata/sources/douban.py (+2/-0)
To merge this branch: bzr merge lp:~lifanxi/calibre/douban-metadata-plugin
Reviewer Review Type Date Requested Status
Kovid Goyal Pending
Review via email: mp+63019@code.launchpad.net

Description of the change

Corrected another bug in API key handling in Douban plugin.
After get the search result, we need to get the details for each items in the result, we also want to pass the API key for those requests.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/calibre/ebooks/metadata/sources/douban.py'
2--- src/calibre/ebooks/metadata/sources/douban.py 2011-05-25 16:31:47 +0000
3+++ src/calibre/ebooks/metadata/sources/douban.py 2011-05-31 17:21:31 +0000
4@@ -46,6 +46,8 @@
5
6 def get_details(browser, url, timeout): # {{{
7 try:
8+ if Douban.DOUBAN_API_KEY and Douban.DOUBAN_API_KEY != '':
9+ url = url + "?apikey=" + Douban.DOUBAN_API_KEY
10 raw = browser.open_novisit(url, timeout=timeout).read()
11 except Exception as e:
12 gc = getattr(e, 'getcode', lambda : -1)

Subscribers

People subscribed via source and target branches