|
|
|
@ -19,7 +19,7 @@ class Audio(Bureau):
|
|
|
|
|
Bureau.__init__(self)
|
|
|
|
|
|
|
|
|
|
self.urldb = self.open_db("urldb")
|
|
|
|
|
self.player = vlc.MediaPlayer()
|
|
|
|
|
self.player = vlc.MediaListPlayer()
|
|
|
|
|
|
|
|
|
|
@add_command("p", "Play an album, track or a live stream.")
|
|
|
|
|
def play(self, data):
|
|
|
|
@ -33,7 +33,9 @@ class Audio(Bureau):
|
|
|
|
|
url = self.urldb.get(shortcode)
|
|
|
|
|
self.log.debug(" playing url " + url)
|
|
|
|
|
|
|
|
|
|
self.player.set_mrl(url)
|
|
|
|
|
playlist = vlc.MediaList()
|
|
|
|
|
playlist.add_media(url)
|
|
|
|
|
self.player.set_media_list(playlist)
|
|
|
|
|
self.player.play()
|
|
|
|
|
|
|
|
|
|
@add_command("stop", "Halt audio playback.")
|
|
|
|
|