Commit 1fac125a authored by Antoine Cellerier's avatar Antoine Cellerier

New dumpmeta lua interface module to dump a file's meta data on stdout/stderr...

New dumpmeta lua interface module to dump a file's meta data on stdout/stderr (I'll let you figure out which one it is). Use as: vlc -I lua --lua-intf dumpmeta filename.mp3
parent 4a38deb9
......@@ -220,6 +220,7 @@ DIST_lua= \
lua/intf/modules/host.lua \
lua/intf/telnet.lua \
lua/intf/dummy.lua \
lua/intf/dumpmeta.lua \
lua/modules/sandbox.lua \
lua/modules/simplexml.lua
......
--[==========================================================================[
rc.lua: remote control module for VLC
--[==========================================================================[
Copyright (C) 2007-2009 the VideoLAN team
$Id$
Authors: Antoine Cellerier <dionoea at videolan dot org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
--]==========================================================================]
--[[ to dump meta data information in the debug output, run:
vlc -I lua --lua-intf dumpmeta coolmusic.mp3
--]]
local meta
repeat
meta = vlc.input.metas()
until meta
vlc.msg.info("Dumping meta data")
if meta then
for key, value in pairs(meta) do
vlc.msg.info(key..": "..value)
end
end
vlc.misc.quit()
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