comparison audtool/audtool.c @ 1440:acdc12679d1a trunk

[svn] - allow environment variable AUDTOOL_REMOTE_URI to influence where the client library accesses the audacious session
author nenolod
date Fri, 28 Jul 2006 00:49:14 -0700
parents 97000f8de201
children f12d7e208b43
comparison
equal deleted inserted replaced
1439:bd0b46c8a70e 1440:acdc12679d1a
87 }; 87 };
88 88
89 gint main(gint argc, gchar **argv) 89 gint main(gint argc, gchar **argv)
90 { 90 {
91 gint i; 91 gint i;
92 gchar *remote_uri;
92 93
93 if (argc < 2) 94 if (argc < 2)
94 { 95 {
95 g_print("%s: usage: %s <command>\n", argv[0], argv[0]); 96 g_print("%s: usage: %s <command>\n", argv[0], argv[0]);
96 g_print("%s: use `%s help' to get a listing of available commands.\n", 97 g_print("%s: use `%s help' to get a listing of available commands.\n",
97 argv[0], argv[0]); 98 argv[0], argv[0]);
98 exit(0); 99 exit(0);
99 } 100 }
101
102 remote_uri = getenv("AUDTOOL_REMOTE_URI");
103 audacious_set_session_uri(remote_uri);
100 104
101 if (!xmms_remote_is_running(0) && g_strcasecmp("help", argv[1]) 105 if (!xmms_remote_is_running(0) && g_strcasecmp("help", argv[1])
102 && g_strcasecmp("list-handlers", argv[1])) 106 && g_strcasecmp("list-handlers", argv[1]))
103 { 107 {
104 g_print("%s: audacious server is not running!\n", argv[0]); 108 g_print("%s: audacious server is not running!\n", argv[0]);