I try to delete the current playing file in playlist. I have some plugin in Lua to do that but the file is stil in use at this time.
Therefore I need a short wait in my script.
function nexttrack()
vlc.playlist.delete(itemId)
vlc.playlist.next()
delete()
end
function delete()
os.remove(filename) -- do nothing at this time
end
I have try os.execute(sleep 1) and os.execute(ping ....) but generally Vlc crashed when I try to run os.execute!
When I run delete() from a massagebox the file will get deleted.
Did somebody have a tip to get it working