Mercurial > libervia-backend
comparison src/plugins/plugin_misc_radiocol.py @ 464:794f60e2da27
plugin radiocol: fixed missing import
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Mar 2012 17:46:42 +0100 |
parents | cf005701624b |
children | 2a072735e459 |
comparison
equal
deleted
inserted
replaced
463:ac568832a71a | 464:794f60e2da27 |
---|---|
33 from sat.tools.xml_tools import dataForm2xml | 33 from sat.tools.xml_tools import dataForm2xml |
34 from sat.tools.games import TarotCard | 34 from sat.tools.games import TarotCard |
35 | 35 |
36 from time import time | 36 from time import time |
37 import os.path | 37 import os.path |
38 from mutagen.oggvorbis import OggVorbis | 38 from mutagen.oggvorbis import OggVorbis, OggVorbisHeaderError |
39 | 39 |
40 try: | 40 try: |
41 from twisted.words.protocols.xmlstream import XMPPHandler | 41 from twisted.words.protocols.xmlstream import XMPPHandler |
42 except ImportError: | 42 except ImportError: |
43 from wokkel.subprotocols import XMPPHandler | 43 from wokkel.subprotocols import XMPPHandler |
222 def playNext(self, room_jid, profile): | 222 def playNext(self, room_jid, profile): |
223 """"Play next sont in queue if exists, and put a timer | 223 """"Play next sont in queue if exists, and put a timer |
224 which trigger after the song has been played to play next one""" | 224 which trigger after the song has been played to play next one""" |
225 #TODO: need to check that there are still peoples in the room | 225 #TODO: need to check that there are still peoples in the room |
226 # and clean the datas/stop the playlist if it's not the case | 226 # and clean the datas/stop the playlist if it's not the case |
227 #TODO: songs need to be erased once played or found invalids | |
227 radio_data = self.radios[room_jid.userhost()] | 228 radio_data = self.radios[room_jid.userhost()] |
228 queue = radio_data['queue'] | 229 queue = radio_data['queue'] |
229 if not queue: | 230 if not queue: |
230 #nothing left to play, we need to wait for uploads | 231 #nothing left to play, we need to wait for uploads |
231 radio_data['playing'] = False | 232 radio_data['playing'] = False |