[vlc-devel] commit: Extensions/Lua script: enhance IMDb descriptor ( Jean-Philippe André )

git version control git at videolan.org
Fri Jan 29 01:17:53 CET 2010


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Fri Jan 29 00:20:55 2010 +0100| [d6c603697f87aa0a55db419d229999cd03163b64] | committer: Jean-Philippe André 

Extensions/Lua script: enhance IMDb descriptor

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

 share/lua/extensions/imdb.lua |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/share/lua/extensions/imdb.lua b/share/lua/extensions/imdb.lua
index 856293e..2eaa7e5 100644
--- a/share/lua/extensions/imdb.lua
+++ b/share/lua/extensions/imdb.lua
@@ -23,7 +23,16 @@
 dlg = nil
 txt = nil
 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
 
 -- Update title text field. Removes file extensions.
@@ -114,7 +123,7 @@ function click_okay()
             if (not table) then break end
             pos = 0
             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...
                 _, pos, title = string.find(table, "<a href=\"" .. link .. "\"[^>]*>([^<]+)</a>", pos)
                 if (not title) then break end -- this would not be normal behavior...




More information about the vlc-devel mailing list