diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2023-03-29 09:24:29 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2023-07-02 12:14:33 -0400 |
commit | 9ba51e355287f234260977e8cd978773e2528cae (patch) | |
tree | 324d3e172f9958bd239621105b7be6cbdd7c57a3 /apps/plugins | |
parent | 129fb4016bb081d9fc204fb66aa56cd4955e868e (diff) | |
download | rockbox-9ba51e355287f234260977e8cd978773e2528cae.tar.gz rockbox-9ba51e355287f234260977e8cd978773e2528cae.zip |
playlist: Remove playlist_add()
It was only used in filetree.c. It's still implemented in Lua so
scripts using rb.playlist_add() won't break, but has been removed
from the Lua API "backend".
Change-Id: I5625a47f0692456008c6b10dee14755151d22f29
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/lua/include_lua/playlist.lua | 2 | ||||
-rw-r--r-- | apps/plugins/lua/rocklib.c | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/apps/plugins/lua/include_lua/playlist.lua b/apps/plugins/lua/include_lua/playlist.lua index e11b30fe7d..dfa839aab1 100644 --- a/apps/plugins/lua/include_lua/playlist.lua +++ b/apps/plugins/lua/include_lua/playlist.lua | |||
@@ -28,7 +28,7 @@ rb.playlist_amount = function() | |||
28 | return rb.playlist("amount") | 28 | return rb.playlist("amount") |
29 | end | 29 | end |
30 | rb.playlist_add = function (filename) | 30 | rb.playlist_add = function (filename) |
31 | return rb.playlist("add", filename) | 31 | return rb.playlist("insert_track", filename, rb.PLAYLIST_INSERT_LAST, false, true) |
32 | end | 32 | end |
33 | rb.playlist_create = function(dir, filename) | 33 | rb.playlist_create = function(dir, filename) |
34 | return rb.playlist("create", dir, filename) | 34 | return rb.playlist("create", dir, filename) |
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 8efaaab169..070fdb4991 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c | |||
@@ -317,13 +317,13 @@ RB_WRAP(splash_scroller) | |||
317 | RB_WRAP(playlist) | 317 | RB_WRAP(playlist) |
318 | { | 318 | { |
319 | /* just passes NULL to work with the current playlist */ | 319 | /* just passes NULL to work with the current playlist */ |
320 | enum e_playlist {PLAYL_AMOUNT = 0, PLAYL_ADD, PLAYL_CREATE, | 320 | enum e_playlist {PLAYL_AMOUNT = 0, 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_INSERTPLAYL, | 323 | PLAYL_INSERTTRACK, PLAYL_INSERTDIRECTORY, PLAYL_INSERTPLAYL, |
324 | PLAYL_ECOUNT}; | 324 | PLAYL_ECOUNT}; |
325 | 325 | ||
326 | const char *playlist_option[] = {"amount", "add", "create", "start", "resume_track", | 326 | const char *playlist_option[] = {"amount", "create", "start", "resume_track", |
327 | "resume", "shuffle", "sync", "remove_all_tracks", | 327 | "resume", "shuffle", "sync", "remove_all_tracks", |
328 | "insert_track", "insert_directory", "insert_playlist", NULL}; | 328 | "insert_track", "insert_directory", "insert_playlist", NULL}; |
329 | 329 | ||
@@ -339,10 +339,6 @@ RB_WRAP(playlist) | |||
339 | case PLAYL_AMOUNT: | 339 | case PLAYL_AMOUNT: |
340 | result = rb->playlist_amount(); | 340 | result = rb->playlist_amount(); |
341 | break; | 341 | break; |
342 | case PLAYL_ADD: | ||
343 | filename = luaL_checkstring(L, 2); | ||
344 | result = rb->playlist_add(filename); | ||
345 | break; | ||
346 | case PLAYL_CREATE: | 342 | case PLAYL_CREATE: |
347 | dir = luaL_checkstring(L, 2); | 343 | dir = luaL_checkstring(L, 2); |
348 | filename = luaL_checkstring(L, 3); | 344 | filename = luaL_checkstring(L, 3); |