Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
f4827eb2
Commit
f4827eb2
authored
Feb 14, 2010
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: fix IMDb script and listen to input changes
parent
4a50f0a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
share/lua/extensions/imdb.lua
share/lua/extensions/imdb.lua
+7
-3
No files found.
share/lua/extensions/imdb.lua
View file @
f4827eb2
...
...
@@ -32,12 +32,12 @@ function descriptor()
..
"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
=
{}
}
capabilities
=
{
"input-listener"
}
}
end
-- Update title text field. Removes file extensions.
function
update_title
()
local
item
=
vlc
.
item
()
local
item
=
vlc
.
i
nput
.
i
tem
()
local
title
=
item
and
item
:
name
()
if
title
~=
nil
then
title
=
string.gsub
(
title
,
"(.*)(%.%w+)$"
,
"%1"
)
...
...
@@ -47,11 +47,15 @@ function update_title()
end
end
function
input_changed
()
update_title
()
end
function
create_dialog
()
dlg
=
vlc
.
dialog
(
"IMDb Search"
)
dlg
:
add_label
(
"The Internet Movie Database"
,
1
,
1
,
4
,
1
)
dlg
:
add_label
(
"<b>Movie Title</b>"
,
1
,
2
,
1
,
1
)
local
item
=
vlc
.
item
()
local
item
=
vlc
.
i
nput
.
i
tem
()
txt
=
dlg
:
add_text_input
(
item
and
item
:
name
()
or
""
,
2
,
2
,
1
,
1
)
dlg
:
add_button
(
"Okay"
,
"click_okay"
,
3
,
2
,
1
,
1
)
dlg
:
add_button
(
"*"
,
"update_title"
,
4
,
2
,
1
,
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment