def play_video(vidid):
    system.kill_vlc()

    if conf.CONTROLS:
        process = system.call_list_silently(["vlc", "-vvv", "http://youtube.com/watch?v=" + vidid], sync=False)
        songfile = open(music_conf.SONG_PID, "w+")
        songfile.write(str(process.pid))
        return process
    else:
        process = system.call_list_silently(
            ["vlc", "-Idummy", "-vvv", "http://youtube.com/watch?v=" + vidid], sync=False
        )
        songfile = open(music_conf.SONG_PID, "w+")
        songfile.write(str(process.pid))
        return process
def play_song(vidid, name):
    system.kill_vlc()

    process = system.call_list_silently(
        ["vlc", "-Idummy", "-Vdummy", "--play-and-exit", "-vvv", "http://youtube.com/watch?v=" + vidid], sync=False
    )

    songfile = open(music_conf.SONG_PID, "w+")
    songfile.write(str(process.pid))

    songfile = open(music_conf.SONG_INFO, "w+")
    songfile.write(name + "\n")
    songfile.write("Unkown\n")
    songfile.write("YouTube")

    return process
 def execute(self, operand):
     system.kill_vlc()
def stop_song():
    system.kill_vlc()