From 8a8dfa0e52d0d7001d52ff29a2da60986b3e5101 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 5 Dec 2021 14:59:46 -0500 Subject: [PATCH] random_playlist.lua bugfix 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 --- apps/plugins/lua_scripts/random_playlist.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/plugins/lua_scripts/random_playlist.lua b/apps/plugins/lua_scripts/random_playlist.lua index 6e4dbe25e2..c87b005a49 100644 --- a/apps/plugins/lua_scripts/random_playlist.lua +++ b/apps/plugins/lua_scripts/random_playlist.lua @@ -250,6 +250,7 @@ function create_random_playlist(database, playlist, trackcount, play) if y >= max_h then do_progress_header() rb.lcd_clear_display() + rb.yield() y = h end end @@ -402,7 +403,7 @@ function create_random_playlist(database, playlist, trackcount, play) rb.splash(10, sREMOVEPLAYLIST) rb.audio("stop") os.remove( playlistpath .. "/" .. playlist) - rb.playlist("remove_all_tracks") + --rb.playlist("remove_all_tracks") rb.playlist("create", playlistpath .. "/", playlist) --[[ --profiling local starttime = rb.current_tick();