ncmpc version 0.15
[ncmpc.git] / src / lyrics.c
blob43800eb48fb6d128dd65623f4084ee82a5d28899
1 /* ncmpc (Ncurses MPD Client)
2 * (c) 2004-2009 The Music Player Daemon Project
3 * Project homepage: http://musicpd.org
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "lyrics.h"
21 #include "config.h"
23 #include <assert.h>
25 static struct plugin_list plugins;
27 void lyrics_init(void)
29 plugin_list_init(&plugins);
30 plugin_list_load_directory(&plugins, LYRICS_PLUGIN_DIR);
33 void lyrics_deinit(void)
35 plugin_list_deinit(&plugins);
38 struct plugin_cycle *
39 lyrics_load(const char *artist, const char *title,
40 plugin_callback_t callback, void *data)
42 const char *args[3] = { artist, title, NULL };
44 assert(artist != NULL);
45 assert(title != NULL);
47 return plugin_run(&plugins, args, callback, data);