diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index 81137dc28..a56f9f95a 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -157,34 +157,6 @@ class AlbumArtOrg(ArtSource): self._log.debug(u'no image found on page') -class GoogleImages(ArtSource): - URL = 'https://ajax.googleapis.com/ajax/services/search/images' - - def get(self, album): - """Return art URL from google.org given an album title and - interpreter. - """ - if not (album.albumartist and album.album): - return - search_string = (album.albumartist + ',' + album.album).encode('utf-8') - response = self.request(self.URL, params={ - 'v': '1.0', - 'q': search_string, - 'start': '0', - }) - - # Get results using JSON. - try: - results = response.json() - data = results['responseData'] - dataInfo = data['results'] - for myUrl in dataInfo: - yield myUrl['unescapedUrl'] - except: - self._log.debug(u'error scraping art page') - return - - class ITunesStore(ArtSource): # Art from the iTunes Store. def get(self, album): @@ -388,7 +360,7 @@ class FileSystem(ArtSource): # Try each source in turn. -SOURCES_ALL = [u'coverart', u'itunes', u'amazon', u'albumart', u'google', +SOURCES_ALL = [u'coverart', u'itunes', u'amazon', u'albumart', u'wikipedia'] ART_SOURCES = { @@ -396,7 +368,6 @@ ART_SOURCES = { u'itunes': ITunesStore, u'albumart': AlbumArtOrg, u'amazon': Amazon, - u'google': GoogleImages, u'wikipedia': Wikipedia, } diff --git a/docs/changelog.rst b/docs/changelog.rst index eceda093c..b1cddc59e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -73,6 +73,8 @@ Fixes: ImageMagick on Windows. :bug:`1721` * Fix a crash when writing some Unicode comment strings to MP3s that used older encodings. The encoding is now always updated to UTF-8. :bug:`879` +* :doc:`/plugins/fetchart`: The Google Images backend has been removed. It + used an API that has been shut down. :bug:`1760` .. _Emby Server: http://emby.media diff --git a/docs/plugins/fetchart.rst b/docs/plugins/fetchart.rst index beaf7f951..80149d478 100644 --- a/docs/plugins/fetchart.rst +++ b/docs/plugins/fetchart.rst @@ -50,7 +50,7 @@ file. The available options are: - **sources**: List of sources to search for images. An asterisk `*` expands to all available sources. Default: ``coverart itunes amazon albumart``, i.e., everything but - ``wikipedia`` and ``google``. Enable those two sources for more matches at + ``wikipedia``. Enable those two sources for more matches at the cost of some speed. Note: ``minwidth`` and ``enforce_ratio`` options require either `ImageMagick`_ @@ -94,7 +94,7 @@ no resizing is performed for album art found on the filesystem---only downloaded art is resized. Server-side resizing can also be slower than local resizing, so consider installing one of the two backends for better performance. -When using ImageMagic, beets looks for the ``convert`` executable in your path. +When using ImageMagick, beets looks for the ``convert`` executable in your path. On some versions of Windows, the program can be shadowed by a system-provided ``convert.exe``. On these systems, you may need to modify your ``%PATH%`` environment variable so that ImageMagick comes first or use Pillow instead. @@ -106,8 +106,9 @@ Album Art Sources ----------------- By default, this plugin searches for art in the local filesystem as well as on -the Cover Art Archive, the iTunes Store, Amazon, AlbumArt.org, -and Google Image Search, and Wikipedia, in that order. You can reorder the sources or remove +the Cover Art Archive, the iTunes Store, Amazon, and AlbumArt.org, in that +order. +You can reorder the sources or remove some to speed up the process using the ``sources`` configuration option. When looking for local album art, beets checks for image files located in the @@ -136,16 +137,6 @@ Once the library is installed, the plugin will use it to search automatically. .. _python-itunes: https://github.com/ocelma/python-itunes .. _pip: http://pip.openplans.org/ -Google Image Search -''''''''''''''''''' - -You can optionally search for cover art on `Google Images`_. This option uses -the first hit for a search query consisting of the artist and album name. It -is therefore approximate: "incorrect" image matches are possible (although -unlikely). - -.. _Google Images: http://images.google.com/ - Embedding Album Art -------------------