summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-12 21:17:28 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-12 21:17:28 +0200
commit7be7cfb77696e8e952997f3daf44bc3a1fdf64be (patch)
tree2d3803867386c681292ca34331b5e6963db61d2b /playlist.c
parentac633ff319b0a1aaa0f3bc431249d3fe5a1971fd (diff)
added option to open files from command line in named playlist
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/playlist.c b/playlist.c
index 9d4b2caa..7e6eb709 100644
--- a/playlist.c
+++ b/playlist.c
@@ -398,6 +398,18 @@ plt_remove (int plt) {
}
}
+int
+plt_find (const char *name) {
+ playlist_t *p = playlists_head;
+ int i = -1;
+ for (i = 0; p; i++, p = p->next) {
+ if (!strcmp (p->title, name)) {
+ return i;
+ }
+ }
+ return -1;
+}
+
void
plt_set_curr (int plt) {
int i;