mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 23:12:51 +01:00
fetchart: minor google backend refactor
This commit is contained in:
parent
99fb656f52
commit
03a41e82da
1 changed files with 2 additions and 4 deletions
|
|
@ -164,14 +164,12 @@ class GoogleImages(ArtSource):
|
|||
"""Return art URL from google custom search engine
|
||||
given an album title and interpreter.
|
||||
"""
|
||||
api_key = config['fetchart']['google_API_key'].get()
|
||||
engine_id = config['fetchart']['google_engine_ID'].get()
|
||||
if not (album.albumartist and album.album):
|
||||
return
|
||||
search_string = (album.albumartist + ',' + album.album).encode('utf-8')
|
||||
response = self.request(self.URL, params={
|
||||
'key': api_key,
|
||||
'cx': engine_id,
|
||||
'key': config['fetchart']['google_API_key'].get(),
|
||||
'cx': config['fetchart']['google_engine_ID'].get(),
|
||||
'q': search_string,
|
||||
'searchType': 'image'
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue