本文整理汇总了Python中spotify.manager.SpotifySessionManager.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SpotifySessionManager.__init__方法的具体用法?Python SpotifySessionManager.__init__怎么用?Python SpotifySessionManager.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类spotify.manager.SpotifySessionManager
的用法示例。
在下文中一共展示了SpotifySessionManager.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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
示例2: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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")
示例3: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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)
示例4: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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..."
示例5: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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()
示例6: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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..."
示例7: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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
示例8: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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..."
示例9: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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..."
示例10: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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..."
示例11: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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
示例12: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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
示例13: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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
示例14: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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..."
示例15: __init__
# 需要导入模块: from spotify.manager import SpotifySessionManager [as 别名]
# 或者: from spotify.manager.SpotifySessionManager import __init__ [as 别名]
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