]> git.sesse.net Git - vlc/blob - share/luameta/README.txt
No need to test for avutil.h a second time
[vlc] / share / luameta / README.txt
1 Instructions to code your own VLC Lua meta script.
2 $Id$
3
4 Examples: See googleimage.lua .
5
6 VLC Lua meta modules should define one of the following functions:
7  * fetch_art(): returns a path to an artwork for the given item
8  * fetch_meta(): returns a table with the following items:
9                 .path: the item's full path / URL
10                 .name: the item's name in playlist (OPTIONAL)
11                 .title: the item's Title (OPTIONAL, meta data)
12                 .artist: the item's Artist (OPTIONAL, meta data)
13                 .genre: the item's Genre (OPTIONAL, meta data)
14                 .copyright: the item's Copyright (OPTIONAL, meta data)
15                 .album: the item's Album (OPTIONAL, meta data)
16                 .tracknum: the item's Tracknum (OPTIONAL, meta data)
17                 .description: the item's Description (OPTIONAL, meta data)
18                 .rating: the item's Rating (OPTIONAL, meta data)
19                 .date: the item's Date (OPTIONAL, meta data)
20                 .setting: the item's Setting (OPTIONAL, meta data)
21                 .url: the item's URL (OPTIONAL, meta data)
22                 .language: the item's Language (OPTIONAL, meta data)
23                 .nowplaying: the item's NowPlaying (OPTIONAL, meta data)
24                 .publisher: the item's Publisher (OPTIONAL, meta data)
25                 .encodedby: the item's EncodedBy (OPTIONAL, meta data)
26                 .arturl: the item's ArtURL (OPTIONAL, meta data)
27                 .trackid: the item's TrackID (OPTIONAL, meta data)
28                 .options: a list of VLC options (OPTIONAL)
29                           example: .options = { "fullscreen" }
30                 .duration: stream duration in seconds (OPTIONAL)
31                 .meta: custom meta data (OPTIONAL, meta data)
32                        A .meta field is a table of custom meta categories which
33                        each have custom meta properties.
34                        example: .meta = { ["Google video"] = { ["docid"] = "-5784010886294950089"; ["GVP version"] = "1.1" }; ["misc"] = { "Hello" = "World!" } }
35             Invalid playlist items will be discarded by VLC.
36
37 VLC defines a global vlc object with the following members:
38  * vlc.stream_new
39  * vlc.stream_delete
40  * vlc.stream_readline
41  * vlc.stream_read
42  * vlc.decode_uri( <string> ): decode %xy characters in a string.
43  * vlc.resolve_xml_special_chars( <string> ): decode &abc; characters in a
44                                               string.
45  * vlc.msg_dbg( <string> ): print a debug message.
46  * vlc.msg_warn( <string> ): print a warning message.
47  * vlc.msg_err( <string> ): print an error message.
48  * vlc.msg_info( <string> ): print an info message.
49
50 Lua scripts are tried in alphabetical order in the user's VLC config
51 director luameta/ subdirectory, then in the global VLC luameta/
52 directory.
53
54 Lua documentation is available on http://www.lua.org .
55 VLC uses Lua 5.1
56 All the Lua standard libraries are available.