[vlc-devel] [PATCH] MusicBrainz: don't lookup front art when not available

Jean-Baptiste Kempf jb at videolan.org
Mon Dec 18 00:37:45 CET 2017


Should close #18387
---
 share/lua/meta/art/00_musicbrainz.lua | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/share/lua/meta/art/00_musicbrainz.lua b/share/lua/meta/art/00_musicbrainz.lua
index 8b80a440e3..262ca353f2 100644
--- a/share/lua/meta/art/00_musicbrainz.lua
+++ b/share/lua/meta/art/00_musicbrainz.lua
@@ -31,8 +31,12 @@ function try_query(mbid)
 
     found, _ = string.find( page, "<artwork>true</artwork>" )
     if found then
-        return "http://coverartarchive.org/release/"..mbid.."/front-500"
+        front, _ = string.find( page, "<front>true</front>" )
+        if front then
+            return "http://coverartarchive.org/release/"..mbid.."/front-500"
+        end
     end
+
     -- FIXME: multiple results may be available
     _, _, asin = string.find( page, "<asin>(%w+)</asin>" )
     if asin then
-- 
2.15.1



More information about the vlc-devel mailing list