Exemple #1
0
    def __init__(self, config, audio):
        super(SpotifyBackend, self).__init__()

        self._config = config
        self._audio = audio
        self._actor_proxy = None
        self._session = None
        self._event_loop = None
        self._bitrate = None

        self.library = library.SpotifyLibraryProvider(backend=self)
        self.playback = playback.SpotifyPlaybackProvider(audio=audio,
                                                         backend=self)
        if config['spotify']['allow_playlists']:
            self.playlists = playlists.SpotifyPlaylistsProvider(backend=self)
        else:
            self.playlists = None
        self.uri_schemes = ['spotify']
Exemple #2
0
def provider(backend_mock):
    return library.SpotifyLibraryProvider(backend_mock)
Exemple #3
0
def provider(backend_mock):
    playlists._sp_links.clear()
    return library.SpotifyLibraryProvider(backend_mock)