aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dump_playlist.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/dump_playlist.c b/test/dump_playlist.c
index 3134d95b1..f789a2820 100644
--- a/test/dump_playlist.c
+++ b/test/dump_playlist.c
@@ -44,15 +44,16 @@ int main(int argc, char **argv)
const char *uri;
struct input_stream is;
bool success;
+ GError *error = NULL;
struct playlist_provider *playlist;
struct song *song;
- if (argc != 2) {
- g_printerr("Usage: dump_playlist URI\n");
+ if (argc != 3) {
+ g_printerr("Usage: dump_playlist CONFIG URI\n");
return 1;
}
- uri = argv[1];
+ uri = argv[2];
/* initialize GLib */
@@ -63,6 +64,13 @@ int main(int argc, char **argv)
tag_pool_init();
config_global_init();
+ success = config_read_file(argv[1], &error);
+ if (!success) {
+ g_printerr("%s:", error->message);
+ g_error_free(error);
+ return 1;
+ }
+
input_stream_global_init();
playlist_list_global_init();