From 03a41e82da06e1d4abeec5705dee573a580d2817 Mon Sep 17 00:00:00 2001 From: Lachlan Charlick Date: Tue, 29 Dec 2015 00:02:41 +1030 Subject: [PATCH] fetchart: minor google backend refactor --- beetsplug/fetchart.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index 7aab88567..9d971a3fc 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -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' })