]> git.sesse.net Git - vlc/blobdiff - modules/lua/vlc.c
lua: remove superfluous equalizer preset code
[vlc] / modules / lua / vlc.c
index 1fb969f696cf794ca31c80c36a9e2decfdba8edb..0c43e07673263e7f1472ea48ffd13d1d2382b7b0 100644 (file)
@@ -50,6 +50,9 @@
 
 #define CONFIG_TEXT N_("Lua interface configuration")
 #define CONFIG_LONGTEXT N_("Lua interface configuration string. Format is: '[\"<interface module name>\"] = { <option> = <value>, ...}, ...'.")
+#define PASS_TEXT N_( "Password" )
+#define PASS_LONGTEXT N_( "A single password restricts access " \
+    "to this interface." )
 #define SRC_TEXT N_( "Source directory" )
 #define SRC_LONGTEXT N_( "Source directory" )
 #define INDEX_TEXT N_( "Directory index" )
@@ -64,9 +67,8 @@
 #define TELNETPORT_LONGTEXT N_( "This is the TCP port on which this " \
     "interface will listen. It defaults to 4212." )
 #define TELNETPWD_TEXT N_( "Password" )
-#define TELNETPWD_LONGTEXT N_( "A single administration password is used " \
-    "to protect this interface. The default value is \"admin\"." )
-#define TELNETPWD_DEFAULT "admin"
+#define TELNETPWD_LONGTEXT N_( "A single password restricts access " \
+    "to this interface." )
 #define RCHOST_TEXT N_("TCP command input")
 #define RCHOST_LONGTEXT N_("Accept commands over a socket rather than stdin. " \
             "You can set the address and port the interface will bind to." )
@@ -92,6 +94,7 @@ vlc_module_begin ()
 
     add_submodule ()
         set_section( N_("Lua HTTP"), 0 )
+            add_password ( "http-password", NULL, PASS_TEXT, PASS_LONGTEXT, false )
             add_string ( "http-src",  NULL, SRC_TEXT,  SRC_LONGTEXT,  true )
             add_bool   ( "http-index", false, INDEX_TEXT, INDEX_LONGTEXT, true )
         set_capability( "interface", 0 )
@@ -118,7 +121,8 @@ vlc_module_begin ()
                         TELNETHOST_LONGTEXT, true )
             add_integer( "telnet-port", TELNETPORT_DEFAULT, TELNETPORT_TEXT,
                          TELNETPORT_LONGTEXT, true )
-            add_password( "telnet-password", TELNETPWD_DEFAULT, TELNETPWD_TEXT,
+                change_integer_range( 1, 65535 )
+            add_password( "telnet-password", NULL, TELNETPWD_TEXT,
 
                           TELNETPWD_LONGTEXT, true )
         set_capability( "interface", 0 )
@@ -126,9 +130,6 @@ vlc_module_begin ()
         set_description( N_("Lua Telnet") )
         add_shortcut( "luatelnet", "telnet" )
 
-        /* add_shortcut( "luahotkeys" ) */
-        /* add_shortcut( "hotkeys" ) */
-
     add_submodule ()
         set_shortname( N_( "Lua Meta Fetcher" ) )
         set_description( N_("Fetch meta data using lua scripts") )
@@ -197,8 +198,7 @@ static int file_compare( const char **a, const char **b )
     return strcmp( *a, *b );
 }
 
-int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
-                     char ***pppsz_dir_list )
+int vlclua_dir_list( const char *luadirname, char ***pppsz_dir_list )
 {
 #define MAX_DIR_LIST_SIZE 5
     *pppsz_dir_list = malloc(MAX_DIR_LIST_SIZE*sizeof(char *));
@@ -268,7 +268,7 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
     char **ppsz_dir_list = NULL;
     int i_ret;
 
-    if( (i_ret = vlclua_dir_list( p_this, luadirname, &ppsz_dir_list )) != VLC_SUCCESS)
+    if( (i_ret = vlclua_dir_list( luadirname, &ppsz_dir_list )) != VLC_SUCCESS)
         return i_ret;
 
     i_ret = VLC_EGENERIC;
@@ -319,7 +319,7 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
 char *vlclua_find_file( vlc_object_t *p_this, const char *psz_luadirname, const char *psz_name )
 {
     char **ppsz_dir_list = NULL;
-    vlclua_dir_list( p_this, psz_luadirname, &ppsz_dir_list );
+    vlclua_dir_list( psz_luadirname, &ppsz_dir_list );
 
     for( char **ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
     {
@@ -605,7 +605,7 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
     char **ppsz_dir_list = NULL;
     char **ppsz_dir;
     lua_State *L = NULL;
-    vlclua_dir_list( obj, "sd", &ppsz_dir_list );
+    vlclua_dir_list( "sd", &ppsz_dir_list );
     for( ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
     {
         int i_files;
@@ -777,7 +777,7 @@ int vlclua_add_modules_path( vlc_object_t *obj, lua_State *L, const char *psz_fi
     count += vlclua_add_modules_path_inner( L, psz_path );
 
     char **ppsz_dir_list = NULL;
-    vlclua_dir_list( obj, psz_char+1/* gruik? */, &ppsz_dir_list );
+    vlclua_dir_list( psz_char+1/* gruik? */, &ppsz_dir_list );
     char **ppsz_dir = ppsz_dir_list;
 
     for( ; *ppsz_dir && strcmp( *ppsz_dir, psz_path ); ppsz_dir++ );