Commit d6c60369 authored by Jean-Philippe André's avatar Jean-Philippe André

Extensions/Lua script: enhance IMDb descriptor

parent 47af2aa4
...@@ -23,7 +23,16 @@ ...@@ -23,7 +23,16 @@
dlg = nil dlg = nil
txt = nil txt = nil
function descriptor() function descriptor()
return { title = "IMDb" ; capabilities = {} } return { title = "IMDb - The Internet Movie Database" ;
version = "0.1" ;
author = "Jean-Philippe André" ;
url = 'http://www.imdb.org/';
description = "<center><b>The Internet Movie Database</b></center>\n"
.. "Get information about movies from the Internet "
.. "Movie Database (IMDb).\nThis Extension will show "
.. "you the cast, a short plot summary and a link to "
.. "the web page on imdb.org." ;
capabilities = {} }
end end
-- Update title text field. Removes file extensions. -- Update title text field. Removes file extensions.
...@@ -114,7 +123,7 @@ function click_okay() ...@@ -114,7 +123,7 @@ function click_okay()
if (not table) then break end if (not table) then break end
pos = 0 pos = 0
while (pos ~= nil) do while (pos ~= nil) do
_, _, link = string.find(table, "<a href=\"([^\"]+)\"", pos) _, _, link = string.find(table, "<a href=\"([^\"]+title[^\"]+)\"", pos)
if (not link) then break end -- this would not be normal behavior... if (not link) then break end -- this would not be normal behavior...
_, pos, title = string.find(table, "<a href=\"" .. link .. "\"[^>]*>([^<]+)</a>", pos) _, pos, title = string.find(table, "<a href=\"" .. link .. "\"[^>]*>([^<]+)</a>", pos)
if (not title) then break end -- this would not be normal behavior... if (not title) then break end -- this would not be normal behavior...
......
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