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

Jean-Baptiste Kempf git at videolan.org
Wed Dec 20 17:04:19 CET 2017


vlc/vlc-3.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Dec 18 00:37:45 2017 +0100| [47f80137067553f4fd061a663694e730583df57b] | committer: Jean-Baptiste Kempf

MusicBrainz: don't lookup front art when not available

Should close #18387

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit e02ecc4dc4454747fb44cd99d09382909e182124)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=47f80137067553f4fd061a663694e730583df57b
---

 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



More information about the vlc-commits mailing list