summaryrefslogtreecommitdiffstats
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.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 2672d446fc..070fdb4991 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -317,14 +317,15 @@ RB_WRAP(splash_scroller)
RB_WRAP(playlist)
{
/* just passes NULL to work with the current playlist */
- enum e_playlist {PLAYL_AMOUNT = 0, PLAYL_ADD, PLAYL_CREATE,
+ enum e_playlist {PLAYL_AMOUNT = 0, PLAYL_CREATE,
PLAYL_START, PLAYL_RESUMETRACK, PLAYL_RESUME,
PLAYL_SHUFFLE, PLAYL_SYNC, PLAYL_REMOVEALLTRACKS,
- PLAYL_INSERTTRACK, PLAYL_INSERTDIRECTORY, PLAYL_ECOUNT};
+ PLAYL_INSERTTRACK, PLAYL_INSERTDIRECTORY, PLAYL_INSERTPLAYL,
+ PLAYL_ECOUNT};
- const char *playlist_option[] = {"amount", "add", "create", "start", "resume_track",
+ const char *playlist_option[] = {"amount", "create", "start", "resume_track",
"resume", "shuffle", "sync", "remove_all_tracks",
- "insert_track", "insert_directory", NULL};
+ "insert_track", "insert_directory", "insert_playlist", NULL};
const char *filename, *dir;
int result = 0;
@@ -338,10 +339,6 @@ RB_WRAP(playlist)
case PLAYL_AMOUNT:
result = rb->playlist_amount();
break;
- case PLAYL_ADD:
- filename = luaL_checkstring(L, 2);
- result = rb->playlist_add(filename);
- break;
case PLAYL_CREATE:
dir = luaL_checkstring(L, 2);
filename = luaL_checkstring(L, 3);
@@ -388,6 +385,12 @@ RB_WRAP(playlist)
recurse = lua_toboolean(L, 5); /* default to false */
result = rb->playlist_insert_directory(NULL, dir, pos, queue, recurse);
break;
+ case PLAYL_INSERTPLAYL:
+ filename = luaL_checkstring(L, 2); /* only required parameter */
+ pos = luaL_optint(L, 3, 0);
+ queue = lua_toboolean(L, 4); /* default to false */
+ result = rb->playlist_insert_playlist(NULL, filename, pos, queue);
+ break;
}
yield();
@@ -923,12 +926,6 @@ RB_WRAP(restart_lua)
return -1;
}
-RB_WRAP(show_logo)
-{
- rb->show_logo();
- return 0;
-}
-
RB_WRAP(mem_stats)
{
/* used, allocd, free = rb.mem_stats() */
@@ -1025,7 +1022,6 @@ static const luaL_Reg rocklib[] =
/* MISC */
RB_FUNC(restart_lua),
- RB_FUNC(show_logo),
RB_FUNC(mem_stats),
{NULL, NULL}
@@ -1083,6 +1079,7 @@ LUALIB_API int luaopen_rock(lua_State *L)
RB_CONSTANT(SYS_USB_DISCONNECTED),
RB_CONSTANT(SYS_TIMEOUT),
RB_CONSTANT(SYS_POWEROFF),
+ RB_CONSTANT(SYS_REBOOT),
RB_CONSTANT(SYS_CHARGER_CONNECTED),
RB_CONSTANT(SYS_CHARGER_DISCONNECTED),