path: root/apps/plugins/lua_scripts
AgeCommit message (Collapse)AuthorFilesLines
2021-12-08random_playlist.lua make index more sparseWilliam Wilgus1-38/+87
The name of the game here is to load the database file without taking over the audio buffer. 5mb database file will now successfully load added an option to save playlist directly to disk and bypass the rb builtin function completely however if you choose play the playlist will be loaded back from the disk into the inram dynamic playlist Change-Id: I43e76f63379721f36ed082c0ad47a6f2539fb15f
2021-12-05plugin.h & lua add playlist_insert_playlistWilliam Wilgus1-14/+58
having issues running lua and loading a playlist Change-Id: I72d32d77e6567ceed7e8e5fd492eebf0ee44561a
2021-12-05random_playlist.lua bugfixWilliam Wilgus1-1/+2
removing trackks after create appears to cause crashes removing the playlist appears to be sufficient to prevent append to the currently saved random_playlist.m3u8 added yield on screent update, since we have no sleep this could be an issue Change-Id: If04517f852e329088e30885d964f2407a2ebf318
2021-12-03lua random_playlist generatorWilliam Wilgus2-7/+472
uses the database to create random playlists of specified size with the advanced GUI you can.. set the number of songs (up to max playlist buffer) set the number of tracks before a repeat is allowed play the tracks when finished -- fix a parsing bug where first and last entry in database were corrupted -- Incremental loading for very large databases, allows decent speed and lower ram usage Change-Id: Ia95469b6a04625b621129ec61e5db4b2b00adc5e
2021-10-21lua add ability to pass PLUGIN_ ret vals with os.exit() + add definesWilliam Wilgus1-0/+19
Change-Id: I45998245271fbd8fee4534f8497b014025e4dcc7
2021-05-06lua -- temp loaderWilliam Wilgus1-3/+28
fix a few bugs, improve memory usage Change-Id: I6ceefd033000a6178eab0dd513679b5d72cec81c
2021-05-04lua add ability to use custom kbd layoutsWilliam Wilgus1-19/+22
bring custom keyboard layouts to lua conversion to the proper format requires create_kbd_layout.lua just pass a lua string with your desired layout Change-Id: I14a392410846311a4f3cf8dda0e88d39834d0418
2021-04-30lua submenus add a way to dynamically add itemsWilliam Wilgus1-8/+36
updated example script and renamed some functions as well fixed bug in printtable cursor position if greater than maxlines for the screen would reset to item 1 now we move the list start and select it (and try to center it on the screen) fixed a few bugs in the add_menu code Change-Id: I01dead0481ef2e925af8b4cc6c14e36c2859dbba
2021-04-28lua add submenu module + cleanupWilliam Wilgus1-0/+93
allows menus + submenus + context menus all with simple tables menu_t which is a table of strings func_t which are the corresponding functions to go with those strings see lua_scripts/submenu_demo.lua Change-Id: I907b74b4abef0ecbe49f181d0ced6e6d20e94de5
2021-04-24lua print_button scriptWilliam Wilgus1-0/+70
also allow splash_scroller to be used as static text display Change-Id: Idc8c9e60ada920e2d1abd5301b59bd235e21a1c2
2021-04-20lua print table put_line a do_menu alternativeWilliam Wilgus6-87/+7
add stylized lines to lua the exported do_menu has a severe limitation of 64 items it also requires double the memory put_line is the way rockbox builds menus update printtable user config from core -- done code cleanup fixed for 1-bit screens changed button behavior fixed for 2-bit screens Change-Id: I4de55e42685aa1d2f53a33bc8e980827864e810b
2020-10-05lua add better memory statsWilliam Wilgus1-0/+32
lua gives you a memory used number that only reflects the current allocations if fact it doesn't even give you a way to get the amount of ram free rb.mem_stats() seeks to fill this gap by marking the memory allocated for lua with a sentinel value which can later be checked to get a high water mark of the ram used by lua and a pretty good idea of how much ram is available Also includes an example script usage: used, allocd, free = rb.mem_stats() Change-Id: Ia282869f989848324d7d88c7df4827fdbce4fb4e
2020-10-04lua misc tweaks and cleanupWilliam Wilgus1-1/+1
checks button_status in rockev strpbrk_n custom implementation allows setting max search len in source string add some branch prediction where appropriate fix formatting in splash_scroller script Change-Id: Id5d8e9d83f4b3e361ccb67b403af8f9a8a31b8f0
2020-10-03lua Add scrollable stack traceback WIPWilliam Wilgus1-0/+1
lua currently splashes a stack traceback on error for deep tracebacks and especially on devices with smaller screens this leaves out a lot of vital information in the past I have resorted to splitting the traceback string or even saving the return to a file This patch provides a scrollable buffer with rudimentary text reflow to allow you to read the whole traceback string Upon traceback if you press nothing the screen will display for 5 seconds If you press OK or CANCEL it will quit immediately PREV/NEXT scrolls the list on button press timeout is disabled lua now provides rb.splash_scroller(timeout, str) example script provided too Change-Id: Idbc8ce0c514196f0fae48c43aeaea8b60d6da1a5
2020-09-30lua rockevents reduce context switching for action and buttonsWilliam Wilgus1-3/+7
check if any buttons are waiting in the queue before triggering the event thread for action & button events makes button events quicker and also spend less time interrupting lua both wins Change-Id: I38346c084afdd99e4608f40b52053ee39730fb40
2020-09-27lua playback exampleWilliam Wilgus1-0/+459
cool little lua based audio player creates dynamic playlist of 10 mp3s found on device if no music loaded I had to limit the depth of search to 3 levels due to the recursive nature of the current dirbrowser functions this could be rectified with a bit more code fixed a bug in print.lua that kept scrolling text even after screen clear Change-Id: Ifd285332df41a409ecaeb1ea447ad15537b5d04c
2020-09-25lua -- add sort by name, size, date to filebrowse includeWilliam Wilgus2-11/+139
I had previously added the fuctionality to luadir but I didn't update the examples also breaks out the file_browser function to be a bit more accessible Change-Id: I14067256b9d76a757f732840cbee1cf84d775b1b
2019-09-07Lua add metadata and settings reading helper moduleWilliam Wilgus2-0/+139
Adds example scripts for reading track metadata + dumping albumart and rockbox settings settings are now stored as a table of strings rather than a table of tables as it saves ~15 kb of ram without adding much complexity Change-Id: I611c312b2a60ab96e595e4710b17aedbd6c0689b
2019-08-04lua optimize print include, fix draw_polyWilliam Wilgus1-0/+6
Change-Id: Ibb530cfa63681727be518173404952e897c9d297
2019-08-04lua add rlimg.lua example script split large includes to separate filesWilliam Wilgus1-0/+919
Change-Id: I67cac5bc4ce5525ab30abf9443f6cc1a33190512
2019-08-02lua update tagnav.lua with reload menu and bug fixesWilliam Wilgus2-25/+61
Change-Id: I0e7364a3432bf867cb368c131bf83643115f9d0b
2019-07-29lua add demo scripts, atexit handler, gui_scrollbar_drawWilliam Wilgus9-0/+1712
Change-Id: Ie8794e8a487f73952dae43e036787b6972fdbbee