Пример #1
0
 def _playStation(self, url):
     try:
         streamList = streamTools.getStreamList(url)
     except streamTools.ParseError:
         return
     if streamList:
         self.modelManager.playQueue.extend(streamList)
Пример #2
0
 def _addStream(self):
     '''Ask the user for the url of the stream to add.'''
     (url,ok) = QInputDialog.getText(self
             , 'Add Stream'
             , 'Please enter the url of the stream you like to add to the playlist.'
             , 0
             , 'Add Stream')
     url = str(url)
     if ok == True and url:
         try:
             streamList = streamTools.getStreamList(url)
         except streamTools.ParseError:
             print 'error: Could not parse stream address.'
             return
         self.playQueue.extend(streamList)