Пример #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']
Пример #2
0
def provider(audio_mock, backend_mock):
    return playback.SpotifyPlaybackProvider(audio=audio_mock,
                                            backend=backend_mock)