diff options
author | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-03-09 18:51:21 +0000 |
---|---|---|
committer | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-03-09 18:51:21 +0000 |
commit | a09d656b90c2355ebf2a38bfaf036a3e1defa1ee (patch) | |
tree | 75e31c0d2ec4f71bffe77593679ff595182702b6 /muggle-plugin/mugglei.c | |
parent | 806a02f87d720494b1b23781f23107ca1f45991e (diff) | |
download | vdr-plugin-muggle-a09d656b90c2355ebf2a38bfaf036a3e1defa1ee.tar.gz vdr-plugin-muggle-a09d656b90c2355ebf2a38bfaf036a3e1defa1ee.tar.bz2 |
rename HAVE_SERVER to HAVE_ONLY_SERVER, simplify connect, replace USE SQL by sql_select_db
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/0.1.4-wr@560 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'muggle-plugin/mugglei.c')
-rwxr-xr-x | muggle-plugin/mugglei.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/muggle-plugin/mugglei.c b/muggle-plugin/mugglei.c index 1e2f7ae..e5e7c21 100755 --- a/muggle-plugin/mugglei.c +++ b/muggle-plugin/mugglei.c @@ -71,7 +71,11 @@ int main( int argc, char *argv[] ) std::cout << "Only files ending in .flac, .mp3, .ogg (ignoring case) will be imported" << std::endl; std::cout << "" << std::endl; std::cout << "Options:" << std::endl; +#ifdef HAVE_ONLY_SERVER std::cout << " -h <hostname> - specify host of mySql database server (default is 'localhost')" << std::endl; +#else + std::cout << " -h <hostname> - specify host of mySql database server (default is mysql embedded')" << std::endl; +#endif std::cout << " -s <socket> - specify a socket for mySQL communication (default is TCP)" << std::endl; std::cout << " -n <database> - specify database name (default is 'GiantDisc')" << std::endl; std::cout << " -u <username> - specify user of mySql database (default is empty)" << std::endl; @@ -80,10 +84,13 @@ int main( int argc, char *argv[] ) std::cout << " -z - scan all database entries and delete entries for files not found" << std::endl; std::cout << " -z is not yet implemented" << std::endl; std::cout << " -c - delete the entire database and recreate a new empty one" << std::endl; -#ifndef HAVE_SERVER +#ifndef HAVE_ONLY_SERVER std::cout << " -d <datadir> - the data directory for the embedded mysql server. Defaults to ./.muggle" << std::endl; #endif std::cout << " -v - the wanted log level, the higher the more. Default is 1" << std::endl; + std::cout << std::endl << std::endl; + std::cout << "if the specified host is localhost, sockets will be used if possible." << std::endl; + std::cout << "Otherwise the -s parameter will be ignored" << std::endl; exit( 1 ); } @@ -92,7 +99,7 @@ int main( int argc, char *argv[] ) import_assorted = false; delete_mode = false; create_mode = false; -#ifndef HAVE_SERVER +#ifndef HAVE_ONLY_SERVER char *buf; asprintf(&buf,"%s/.muggle",getenv("HOME")); set_datadir(buf); @@ -102,7 +109,7 @@ int main( int argc, char *argv[] ) // parse command line options while( 1 ) { -#ifndef HAVE_SERVER +#ifndef HAVE_ONLY_SERVER int c = getopt(argc, argv, "h:s:n:u:p:t:zcv:d:"); #else int c = getopt(argc, argv, "h:s:n:u:p:t:zcv:"); @@ -153,7 +160,7 @@ int main( int argc, char *argv[] ) { mgSetDebugLevel(atol(optarg)); } break; -#ifndef HAVE_SERVER +#ifndef HAVE_ONLY_SERVER case 'd': { set_datadir(optarg); |