Ejemplo n.º 1
0
    def __init__(self, config, audio, backend_ref):

        self.cache_location = config['spotify']['cache_dir']
        self.settings_location = config['spotify']['cache_dir']

        PyspotifySessionManager.__init__(
            self,
            config['spotify']['username'],
            config['spotify']['password'],
            proxy=config['proxy']['hostname'],
            proxy_username=config['proxy']['username'],
            proxy_password=config['proxy']['password'])

        process.BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.audio = audio
        self.backend = None
        self.backend_ref = backend_ref

        self.bitrate = config['spotify']['bitrate']

        self.connected = threading.Event()
        self.push_audio_data = True
        self.buffer_timestamp = 0

        self.container_manager = None
        self.playlist_manager = None

        self._initial_data_receive_completed = False
Ejemplo n.º 2
0
    def __init__(self, config, audio, backend_ref):

        self.cache_location = config["spotify"]["cache_dir"]
        self.settings_location = config["spotify"]["cache_dir"]

        PyspotifySessionManager.__init__(
            self,
            config["spotify"]["username"],
            config["spotify"]["password"],
            proxy=config["proxy"]["hostname"],
            proxy_username=config["proxy"]["username"],
            proxy_password=config["proxy"]["password"],
        )

        process.BaseThread.__init__(self)
        self.name = "SpotifyThread"

        self.audio = audio
        self.backend = None
        self.backend_ref = backend_ref

        self.bitrate = config["spotify"]["bitrate"]

        self.connected = threading.Event()
        self.push_audio_data = True
        self.buffer_timestamp = 0

        self.container_manager = None
        self.playlist_manager = None

        self._initial_data_receive_completed = False
Ejemplo n.º 3
0
 def __init__(self, service):
     self.service = service
     self.cache_location = self.service.store.dbdir.child("temp").path
     SpotifySessionManager.__init__(self, service.username, service.password)
     self.ctr = None
     self.playing = False
     log.msg("Connecting as %s" % service.username, system="squeal.spot.service.SpotifyManager")
Ejemplo n.º 4
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AlsaController()
     self.ui = JukeboxUI(self)
     self.ctr = None
     self.playing = False
     self._queue = []
     print "Logging in, please wait..."
Ejemplo n.º 5
0
 def __init__(self, condition, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AlsaController()
     self.ctr = None
     self.playing = False
     self._queue = []
     self.playlist_manager = JukeboxPlaylistManager()
     self.container_manager = JukeboxContainerManager(condition)
Ejemplo n.º 6
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AlsaController()
     self.ui = JukeboxUI(self)
     self.ctr = None
     self.playing = False
     self._queue = []
     print "Logging in, please wait..."
Ejemplo n.º 7
0
    def __init__(self, *args, **kwargs):
        threading.Thread.__init__(self)
        SpotifySessionManager.__init__(self, *args, **kwargs)

        self.audio = AlsaController()
        self.playing = False
        self.loaded_tracks = []
        self.start()
Ejemplo n.º 8
0
 def __init__(self, list, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AlsaController()
     self.ctr = None
     self.playing = False
     self._queue = []
     self.to_random = list
     print "Logging in, please wait..."
Ejemplo n.º 9
0
	def __init__(self,username, *a, **kw):
		SpotifySessionManager.__init__(self, username,*a, **kw)
		self.audio = AudioSink(backend=self)
		self.playing = False
		self._queue = []
		self.currentIndex = 0
		self.track_playing = None
		self.manager = QueueManager(self,username)
		self.loading = False			
Ejemplo n.º 10
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AlsaController()
     self.ui = HTTPRequests(self)
     self.ctr = None
     self.playing = False
     self.username = a[0]
     self._queue = []
     print "Trying to log in as " + a[0] + ", please wait..."
Ejemplo n.º 11
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AudioSink(backend=self)
     self.ctr = None
     self.playing = False
     self._queue = []
     self.playlist_manager = JukeboxPlaylistManager()
     self.container_manager = JukeboxContainerManager()
     self.track_playing = None
     print "Logging in, please wait..."
Ejemplo n.º 12
0
 def __init__(self, track_uri, username=None, password=None, remember_me=False,
              login_blob='', proxy=None, proxy_username=None,
              proxy_password=None):
     SpotifySessionManager.__init__(self, username=username, password=password,
                                    remember_me=remember_me, login_blob=login_blob,
                                    proxy=proxy, proxy_username=proxy_username,
                                    proxy_password=proxy_password)
     self.track_uri = track_uri
     self.ctr = None
     # self.container_manager = JukeboxContainerManager()
     print "Logging in, please wait..."
Ejemplo n.º 13
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AudioSink(backend=self)
     self.ui = my_ui(self)  #JukeboxUI(self)
     self.ctr = None
     self.playing = False
     self._queue = []
     self.playlist_manager = JukeboxPlaylistManager()
     self.container_manager = JukeboxContainerManager()
     self.track_playing = None
     print "Logging in, please wait..."
Ejemplo n.º 14
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.db = Database()
     self.audio = AudioController()
     self.ui = JukeboxWebUI(self)
     self.ctr = None
     self.playing = False
     self._queue = []
     self.playlist_manager = JukeboxPlaylistManager()
     self.container_manager = JukeboxContainerManager()
     self.playlist = None
     self.track = None
Ejemplo n.º 15
0
    def __init__(self, username, password):
        PyspotifySessionManager.__init__(self, username, password)
        BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.gstreamer = None
        self.backend = None

        self.connected = threading.Event()
        self.session = None

        self.container_manager = None
        self.playlist_manager = None
Ejemplo n.º 16
0
    def __init__(self, username, password):
        PyspotifySessionManager.__init__(self, username, password)
        BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.gstreamer = None
        self.backend = None

        self.connected = threading.Event()
        self.session = None

        self.container_manager = None
        self.playlist_manager = None
Ejemplo n.º 17
0
    def __init__(self, username, password):
        PyspotifySessionManager.__init__(self, username, password)
        BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.audio = None
        self.backend = None

        self.connected = threading.Event()
        self.session = None

        self.container_manager = None
        self.playlist_manager = None

        self._initial_data_receive_completed = False
Ejemplo n.º 18
0
    def __init__(self, username, password):
        PyspotifySessionManager.__init__(self, username, password)
        BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.audio = None
        self.backend = None

        self.connected = threading.Event()
        self.session = None

        self.container_manager = None
        self.playlist_manager = None

        self._initial_data_receive_completed = False
Ejemplo n.º 19
0
    def __init__(self, username, password, audio, backend_ref, proxy=None,
                 proxy_username=None, proxy_password=None):
        PyspotifySessionManager.__init__(
            self, username, password, proxy=proxy,
            proxy_username=proxy_username,
            proxy_password=proxy_password)
        process.BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.audio = audio
        self.backend = None
        self.backend_ref = backend_ref

        self.connected = threading.Event()

        self.container_manager = None
        self.playlist_manager = None

        self._initial_data_receive_completed = False
Ejemplo n.º 20
0
    def __init__(self, username, password, audio, backend_ref, proxy=None,
                 proxy_username=None, proxy_password=None):
        PyspotifySessionManager.__init__(
            self, username, password, proxy=proxy,
            proxy_username=proxy_username,
            proxy_password=proxy_password)
        process.BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.audio = audio
        self.backend = None
        self.backend_ref = backend_ref

        self.connected = threading.Event()
        self.session = None

        self.container_manager = None
        self.playlist_manager = None

        self._initial_data_receive_completed = False
Ejemplo n.º 21
0
 def __init__(self, *a, **kw):
     #
     # Prevent the Spotify Session Manager from trying to read the appkey from file 
     self.appkey_file = None
     self.application_key = kw['application_key']
     
     #
     # Parent constructor
     SpotifySessionManager.__init__(self, *a, **kw)
     
     #
     # Standard set up
     self.audio = AudioSink(backend=self)
     # MJW self.ui = JukeboxUI(self)
     self.ctr = None
     self.playing = False
     self._queue = []
     self.playlist_manager = JukeboxPlaylistManager()
     self.container_manager = JukeboxContainerManager()
     self.track_playing = None
     print "Logging in, please wait..."
Ejemplo n.º 22
0
    def __init__(self, config, audio, backend_ref):

        self.cache_location = config['spotify']['cache_dir']
        self.settings_location = config['spotify']['settings_dir']

        self.logins = SpotifyLoginManager(config['spotify'])
        username, password = self.logins.get_login()

        full_proxy = ''
        if config['proxy']['hostname']:
            full_proxy = config['proxy']['hostname']
            if config['proxy']['port']:
                full_proxy += ':' + str(config['proxy']['port'])
            if config['proxy']['scheme']:
                full_proxy = config['proxy']['scheme'] + "://" + full_proxy

        PyspotifySessionManager.__init__(
            self, username, password,
            proxy=full_proxy,
            proxy_username=config['proxy']['username'],
            proxy_password=config['proxy']['password'])

        process.BaseThread.__init__(self)
        self.name = 'SpotifyThread'

        self.audio = audio
        self.backend = None
        self.backend_ref = backend_ref

        self.bitrate = config['spotify']['bitrate']

        self.connected = threading.Event()
        self.push_audio_data = True
        self.buffer_timestamp = 0

        self.container_manager = None
        self.playlist_manager = None

        self._initial_data_receive_completed = False
Ejemplo n.º 23
0
 def __init__(self):
     SpotifySessionManager.__init__(self, "username_good", "password_good")
     self.awoken = threading.Event()  # used to block until awoken
Ejemplo n.º 24
0
 def __init__(self, keys, *a, **kw):
     self.application_key = keys
     SpotifySessionManager.__init__(self, *a, **kw)
Ejemplo n.º 25
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.ui = SpoTubeUI(self)
     self.ctr = None
     self.container_manager = SpoTubeContainerManager()
     print("[Spotify] Logging in, please wait...")
Ejemplo n.º 26
0
 def __init__(self):
     SpotifySessionManager.__init__(self, "username_good", "password_good")
Ejemplo n.º 27
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.audio = AlsaController()
Ejemplo n.º 28
0
 def __init__(self, service):
     self.service = service
     SpotifySessionManager.__init__(self, service.username, service.password)
     self.ctr = None
     self.playing = False
     log.msg("Connecting as %s" % service.username, system="squeal.spot.service.SpotifyManager")
Ejemplo n.º 29
0
 def __init__(self, usr, pwd, all_loaded):
     SpotifySessionManager.__init__(self, usr, pwd)
     threading.Thread.__init__(self)
     self.ctr = None
     self.playlist_manager = YoukboxPlaylistManager()
     self.container_manager = YoukboxContainerManager(all_loaded)
Ejemplo n.º 30
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.playlist = None
     self.track = None
     self.results = False
Ejemplo n.º 31
0
 def __init__(self):
     SpotifySessionManager.__init__(self, "username_good", "password_good")
     self.awoken = threading.Event() # used to block until awoken
Ejemplo n.º 32
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.ui = SpoTubeUI(self)
     self.ctr = None
     self.container_manager = SpoTubeContainerManager()
     print ("[Spotify] Logging in, please wait...")
 def __init__(self, username=None, password=None):
     SpotifySessionManager.__init__(self, username, password)
Ejemplo n.º 34
0
 def __init__(self, username, password, backend):
     SpotifySessionManager.__init__(self, username, password)
     threading.Thread.__init__(self)
     self.backend = backend
     self.audio = AlsaController()
Ejemplo n.º 35
0
 def __init__(self, keys, *a, **kw):
   self.application_key = keys 
   SpotifySessionManager.__init__(self, *a, **kw)
Ejemplo n.º 36
0
 def __init__(self, *a, **kw):
     SpotifySessionManager.__init__(self, *a, **kw)
     self.pcntr = None
     self.pname = 'testing2'
     self.current_p = None