Code: Select all
function descriptor()
return {
title = "Atomic Radio test";
}
end
function play_random_song(pathTo)
vlc.playlist.clear()
vlc.playlist.add({{path = pathTo}})
vlc.playlist.random("random")
vlc.playlist.next()
vlc.playlist.play()
end
function activate()
vlc.msg.info("Atomic Radio extension activated!")
local adList = "file:///C:/Users/JuneTooJuly/Desktop/AtomicRadio/adList.xspf"
local musicList = "file:///C:/Users/JuneTooJuly/Desktop/AtomicRadio/atomicMusicList.xspf"
local interMusicList = "file:///C:/Users/JuneTooJuly/Desktop/AtomicRadio/interMusicList.xspf"
local introAdList = "file:///C:/Users/JuneTooJuly/Desktop/AtomicRadio/introAdList.xspf"
local introMusicList = "file:///C:/Users/JuneTooJuly/Desktop/AtomicRadio/introMusicList.xspf"
local currentTrackID = 0
while true do
play_random_song(introMusicList)
vlc.win.console_wait(15)
play_random_song(musicList)
vlc.win.console_wait(15)
play_random_song(interMusicList)
vlc.win.console_wait(15)
play_random_song(musicList)
vlc.win.console_wait(15)
play_random_song(introAdList)
vlc.win.console_wait(15)
play_random_song(adList)
vlc.win.console_wait(15)
end
end
function deactivate()
-- Stop playback when the script is deactivated
vlc.playlist.stop()
end