Commit 0d9b8704 authored by Konstantin Pavlov's avatar Konstantin Pavlov

Musicbrainz art: remove dead code. vlc.misc is unavailable in meta.

parent ce16db86
...@@ -20,19 +20,6 @@ ...@@ -20,19 +20,6 @@
--]] --]]
function try_query(query) function try_query(query)
local l = vlc.object.libvlc()
local t = vlc.var.get( l, "musicbrainz-previousdate" )
if t ~= nil then
if t + 2000000. > vlc.misc.mdate() then
vlc.msg.warn( "We must wait 2 second between requests unless we want to be blacklisted from the musicbrainz server." )
vlc.misc.mwait( t + 2000000. )
end
vlc.var.set( l, "musicbrainz-previousdate", vlc.misc.mdate() )
else
vlc.var.create( l, "musicbrainz-previousdate", vlc.misc.mdate() )
end
l = nil
vlc.msg.dbg( query )
local s = vlc.stream( query ) local s = vlc.stream( query )
if not s then return nil end if not s then return nil end
local page = s:read( 65653 ) local page = s:read( 65653 )
...@@ -40,7 +27,6 @@ function try_query(query) ...@@ -40,7 +27,6 @@ function try_query(query)
-- FIXME: multiple results may be available -- FIXME: multiple results may be available
_, _, asin = string.find( page, "<asin>(%w+)</asin>" ) _, _, asin = string.find( page, "<asin>(%w+)</asin>" )
if asin then if asin then
vlc.msg.dbg( asin )
return "http://images.amazon.com/images/P/"..asin..".01._SCLZZZZZZZ_.jpg" return "http://images.amazon.com/images/P/"..asin..".01._SCLZZZZZZZ_.jpg"
else else
return nil return nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment