Esempio n. 1
0
def provider(backend_mock, web_client_mock):
    backend_mock._web_client = web_client_mock
    playlists._sp_links.clear()
    provider = playlists.SpotifyPlaylistsProvider(backend_mock)
    provider._loaded = True
    provider._test_request_history = (
        lambda: web_client_mock._test_requests_history)
    return provider
Esempio n. 2
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']
def provider(backend_mock):
    return playlists.SpotifyPlaylistsProvider(backend_mock)
Esempio n. 4
0
def provider(backend_mock, web_client_mock):
    backend_mock._web_client = web_client_mock
    playlists._sp_links.clear()
    provider = playlists.SpotifyPlaylistsProvider(backend_mock)
    provider._loaded = True
    return provider