diff options
author | waker <wakeroid@gmail.com> | 2011-04-25 17:08:48 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-04-25 17:08:48 +0200 |
commit | 5e057571477278c38c48e9cfb3b426b274f6e1a1 (patch) | |
tree | 14b6b369a3cb48d4690be530ac176c0294704c10 /playlist.c | |
parent | 07c86104dbf25b53fef8c210237c6fb693ca784a (diff) |
improved plugin API versioning;
block adding files from cmdline while adding from gui
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1601,16 +1601,25 @@ pl_add_dir (const char *dirname, int (*cb)(playItem_t *it, void *data), void *us return -1; } -void +int pl_add_files_begin (int plt) { + pl_lock (); + if (addfiles_playlist) { + pl_unlock (); + return -1; + } addfiles_playlist = plt_get (plt); + pl_unlock (); trace ("adding to playlist %d (%s)\n", plt, addfiles_playlist->title); + return 0; } void pl_add_files_end (void) { trace ("end adding to playlist %s\n", addfiles_playlist->title); + pl_lock (); addfiles_playlist = NULL; + pl_unlock (); } int |