Benjamin Drung schrob: > thanks for this patch. One thing is missing: running xmms2 with > --verbose / -v should trigger the previous behavior.
Here you go... Jan -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
diff -ru cli.orig/cmd_pls.c cli/cmd_pls.c --- cli.orig/cmd_pls.c 2009-08-21 11:05:46.000000000 +0200 +++ cli/cmd_pls.c 2009-08-21 11:38:05.000000000 +0200 @@ -38,7 +38,7 @@ url = format_url (item, G_FILE_TEST_IS_REGULAR); if (!url) { - print_error ("Invalid url"); + print_error ("Invalid url: %s", item); } res = xmmsc_playlist_add_url (conn, playlist, url); @@ -51,7 +51,9 @@ } xmmsc_result_unref (res); - print_info ("Added %s", item); + if (verbose) { + print_info ("Added %s", item); + } } @@ -211,7 +213,7 @@ if (!url) { url = format_url (argv[3], G_FILE_TEST_IS_REGULAR); if (!url) { - print_error ("Invalid url"); + print_error ("Invalid url: %s", argv[3]); } else { /* FIXME: Fulhack to check for optional playlist argument */ playlist = argv[2]; @@ -258,7 +260,7 @@ } if (!url) { - print_error ("Invalid url"); + print_error ("Invalid url: %s", (*endptr == '\0') ? argv[3] : argv[4] ); } res = xmmsc_playlist_insert_url (conn, playlist, pos, url); diff -ru cli.orig/common.h cli/common.h --- cli.orig/common.h 2009-08-21 11:05:46.000000000 +0200 +++ cli/common.h 2009-08-21 11:19:58.000000000 +0200 @@ -31,6 +31,8 @@ void (*func) (xmmsc_connection_t *conn, int argc, char **argv); } cmds; +gboolean verbose; + gboolean x_realpath (const gchar *item, gchar *rpath); gchar *x_path2url (gchar *path); gchar *format_url (gchar *item, GFileTest test); diff -ru cli.orig/main.c cli/main.c --- cli.orig/main.c 2009-08-21 11:05:46.000000000 +0200 +++ cli/main.c 2009-08-21 11:39:24.000000000 +0200 @@ -237,6 +237,16 @@ setlocale (LC_ALL, ""); + verbose = FALSE; + while ( argc >1 && ( !g_ascii_strcasecmp (argv[1], "-v") || + !g_ascii_strcasecmp (argv[1], "--verbose") ) + ) { + verbose = TRUE; + argv[1] = argv[0]; + --argc; + ++argv; + } + config = read_config (); atexit (free_config);
-- _______________________________________________ Xmms2-devel mailing list Xmms2-devel@lists.xmms.se http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel