summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 2672d446fc..6131a479db 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -320,11 +320,12 @@ RB_WRAP(playlist)
320 enum e_playlist {PLAYL_AMOUNT = 0, PLAYL_ADD, PLAYL_CREATE, 320 enum e_playlist {PLAYL_AMOUNT = 0, PLAYL_ADD, PLAYL_CREATE,
321 PLAYL_START, PLAYL_RESUMETRACK, PLAYL_RESUME, 321 PLAYL_START, PLAYL_RESUMETRACK, PLAYL_RESUME,
322 PLAYL_SHUFFLE, PLAYL_SYNC, PLAYL_REMOVEALLTRACKS, 322 PLAYL_SHUFFLE, PLAYL_SYNC, PLAYL_REMOVEALLTRACKS,
323 PLAYL_INSERTTRACK, PLAYL_INSERTDIRECTORY, PLAYL_ECOUNT}; 323 PLAYL_INSERTTRACK, PLAYL_INSERTDIRECTORY, PLAYL_INSERTPLAYL,
324 PLAYL_ECOUNT};
324 325
325 const char *playlist_option[] = {"amount", "add", "create", "start", "resume_track", 326 const char *playlist_option[] = {"amount", "add", "create", "start", "resume_track",
326 "resume", "shuffle", "sync", "remove_all_tracks", 327 "resume", "shuffle", "sync", "remove_all_tracks",
327 "insert_track", "insert_directory", NULL}; 328 "insert_track", "insert_directory", "insert_playlist", NULL};
328 329
329 const char *filename, *dir; 330 const char *filename, *dir;
330 int result = 0; 331 int result = 0;
@@ -388,6 +389,12 @@ RB_WRAP(playlist)
388 recurse = lua_toboolean(L, 5); /* default to false */ 389 recurse = lua_toboolean(L, 5); /* default to false */
389 result = rb->playlist_insert_directory(NULL, dir, pos, queue, recurse); 390 result = rb->playlist_insert_directory(NULL, dir, pos, queue, recurse);
390 break; 391 break;
392 case PLAYL_INSERTPLAYL:
393 filename = luaL_checkstring(L, 2); /* only required parameter */
394 pos = luaL_optint(L, 3, 0);
395 queue = lua_toboolean(L, 4); /* default to false */
396 result = rb->playlist_insert_playlist(NULL, filename, pos, queue);
397 break;
391 } 398 }
392 399
393 yield(); 400 yield();