for title in songs:
media_player = vlc.MediaPlayer()
media = vlc.Media(title + ".mp4")
media.add_option('start-time=' + str(seconds))
media.add_option('stop-time=' + str(seconds + 20))
media_player.set_media(media)
media_player.play()
time.sleep(20)
If I remove time.sleep, the next song immediately plays. How can I wait until the current song finishes its set time then play the next one?
I tried using start and stop times but it did not work.