def __init__( self ): self.pandora = pandora.Pandora() self.curStation = "" self.curSong = -1 self.playing = False self.skip = {'live':False, 'remix':False, 'edit':False, 'ban':False} self.die = False self.settings = {"username":"", "password":""} self.skinName = "Default" self.song = None self.songinfo = [] self.displaysongs = [] self.songCount = 0 self.songChangeCallBack = None self.curVolume = 75 self.player = vlc.MediaPlayer()
def __init__( self ): self.pandora = pandora.Pandora() self.curStation = "" self.curSong = -1 self.playing = False self.skip = {'live':False, 'remix':False, 'edit':False, 'ban':False} self.die = False self.settings = {"username":"", "password":""} self.skinName = "Default" self.song = None self.songinfo = [] self.displaysongs = [] self.songCount = 0 self.songChangeCallBack = None self.curVolume = 75 self.buffer_percent = 100 #self.player = gst.element_factory_make('playbin', 'player') self.player = gst.element_factory_make("playbin2", "player") self.player.props.flags |= (1 << 7) # enable progressive download (GST_PLAY_FLAG_DOWNLOAD)
def __init__(self): object.__init__(self) self.pan = pandora.Pandora()
'''simply prints the status of the downloader on screen, not functionally required''' try: out = downloader.stdout while(True): subsystemOut = out.readline().decode("utf-8") if subsystemOut == '': break subsystemOut = subsystemOut.strip() subsystemOut = subsystemOut.replace("\r", "").replace("\n", "") print "[ Downloader ] : "+subsystemOut except: print "[ Downloader ] : error updating status" pan = pandora.Pandora() settings = loadSettings(SETTINGS_FILE) pan.authenticate(settings['un'],settings['pw']) raw = settings['lastStation'] newStation = "" #def getStation(stationName): for station in pan.stations: if raw == station['stationName']: # or raw_i == station['topStationsSortIndex']: newStation = station pan.switch_station(newStation) if pan.current_station is None: