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
This commit is contained in:
William Wilgus 2021-12-05 14:59:46 -05:00 committed by William Wilgus
parent 0e985a4461
commit 8a8dfa0e52

View file

@ -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();