]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Rename the --dbtool option to --selector
authorAndre <maan@p133.(none)>
Fri, 10 Mar 2006 17:58:17 +0000 (18:58 +0100)
committerAndre <maan@p133.(none)>
Fri, 10 Mar 2006 17:58:17 +0000 (18:58 +0100)
As two out of the three "database tools" of paraslash don't use a
database at all, let's call them "audio file selectors" instead.

NEWS
random_dbtool.c
server.c
server.ggo

diff --git a/NEWS b/NEWS
index 15621e315baeb2ad8a7326dc65aba109b4a7c024..0ef3d1b5529ff1ac81c9ec81cf620dc24f66f7d2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,9 +12,9 @@ NEWS
        o new database tool: plm, the playlist manager
 
        o para_server: the dopey file selector is now called "random",
-       and it is selected by default.  Use the --dbtool option to
-       choose another dbtool at startup, or the cdt command to switch
-       between the supported dbtools.
+       and it is selected by default.  Use the --selector option to
+       choose another selector at startup, or the cdt command to switch
+       between the supported selectors.
 
        o X86_64 fixes (thanks to Steffen Klassert)
 
index 26a6b109c06df4b6373d11de9ee7d894bd5e28e7..e88206c2508dee9e094b2d2be409487c33a75390 100644 (file)
@@ -83,7 +83,7 @@ static char **random_get_audio_file_list(unsigned int num)
        audio_file_list = NULL;
        num_audio_files = 0;
        /* first run, just count all audio files. dopey */
-       ret = find_audio_files(conf.random_dbtool_dir_arg, count_audio_files);
+       ret = find_audio_files(conf.random_dir_arg, count_audio_files);
        if (ret < 0)
                goto out;
        ret = -E_NOTHING_FOUND;
@@ -93,7 +93,7 @@ static char **random_get_audio_file_list(unsigned int num)
        audio_file_list = para_malloc(num_audio_files * sizeof(char *));
        audio_file_count = 0;
        /* second run (hot dentry cache, hopefully), fill audio_file_list */
-       ret = find_audio_files(conf.random_dbtool_dir_arg, remember_file);
+       ret = find_audio_files(conf.random_dir_arg, remember_file);
        if (ret < 0)
                goto out;
        /* careful, files might got deleted underneath */
index 538d201b78a4a69a23467f94fef595933f8f802b..41f1558d44fac653ef3c4d323b725e3fc8ef9cc8 100644 (file)
--- a/server.c
+++ b/server.c
@@ -281,10 +281,10 @@ static void init_dbtool(void)
        int i, ret;
 
        mmd->dbt_change = -1; /* no change nec., set to new dbt num by com_cdt */
-       if (!conf.dbtool_given)
+       if (!conf.selector_given)
                goto random;
        for (i = 0; dblist[i].name; i++) {
-               if (strcmp(dblist[i].name, conf.dbtool_arg))
+               if (strcmp(dblist[i].name, conf.selector_arg))
                        continue;
                PARA_NOTICE_LOG("initializing %s database tool\n",
                        dblist[i].name);
index a7db080ae51c6c1e5b5244187acc8aca386aa94d..27727deb92587f26971b05252867b9bf064fe8cb 100644 (file)
@@ -9,12 +9,12 @@ option "logfile" L "(default=stdout/stderr)" string typestr="filename" no
 option "config_file" c "(default='~/.paraslash/server.conf'" string typestr="filename" no
 option "user_list" - "(default='~/.paraslash/server.users')" string typestr="filename" no
 
-section "Options concerning the audio file sender"
+section "audio file sender"
 option "autoplay" a "start playing on startup" flag off
 option "announce_time" A "Delay betweeen announcing the stream and sending data" int typestr="milliseconds" default="300" no
-option "dbtool" D "(default=first available that works)" string typestr="name_of_dbtool" no
+option "selector" S "(default=random)" string typestr="name" no
 
-section "Mysql database tool options"
+section "mysql selector:"
 option "mysql_host" - "mysql server" string default="localhost" no
 option "mysql_port" - "where mysql is listening" int default="3306" no
 option "mysql_user" - "default value: username from /etc/passwd" string no
@@ -23,19 +23,17 @@ option "mysql_database" - "name of mysql database" string default="paraslash" no
 option "mysql_audio_file_dir"  - "dir to search for audio files (required)" string no
 option "mysql_default_score" - "scoring rule to use if stream definition does not contain explicit score definition" string default="(LASTPLAYED() / 1440 - 1000 / (LASTPLAYED() + 1) - sqrt(NUMPLAYED()))" no
 
+section "random selector"
+option "random_dir" - "dir to search for audio files" string default="/home/music" no
 
-
-section "Random database tool options"
-option "random_dbtool_dir" - "dir to search for files to be streamed" string default="/home/music" no
-
-section "Http sender options"
+section "http sender"
 option "http_port" - "tcp port for http streaming" int typestr="portnumber" default="8000" no
 option "http_default_deny" - "deny connections from hosts which are not explicitly allowed" flag off
 option "http_access" - "Add given host/network to access control list (whitelist if http_default_deny was given, blacklist otherwise) before opening the tcp port. This option can be given multiple times. Example: '192.168.0.0/24' whitelists/blacklists the 256 hosts 192.168.0.x" string typestr="a.b.c.d/n" no multiple
 option "http_no_autostart" - "do not open tcp port on server startup" flag off
 option "http_max_clients" - "maximal simultaneous connections, non-positive value means unlimited" int typestr="number" default="-1" no
 
-section "Ortp sender options"
+section "ortp sender"
 option "ortp_target" - "Add given host/port to the list of targets. This option can be given multiple times. Example: '224.0.1.38:1500' instructs the ortp sender to send to udp port 1500 on host 224.0.1.38 (unassigned ip in the Local Network Control Block 224.0.0/24). This is useful for LAN-streaming." string typestr="a.b.c.d:p" no multiple
 option "ortp_no_autostart" - "do not start to send automatically" flag off
 option "ortp_default_port" - "default udp port if not specified" int typestr="portnumber" default="1500" no