def __init__(self, *args, **kwargs): from .library import SpotifyLibraryProvider from .playback import SpotifyPlaybackProvider from .stored_playlists import SpotifyStoredPlaylistsProvider super(SpotifyBackend, self).__init__() self.current_playlist = core.CurrentPlaylistController(backend=self) library_provider = SpotifyLibraryProvider(backend=self) self.library = core.LibraryController(backend=self, provider=library_provider) playback_provider = SpotifyPlaybackProvider(backend=self) self.playback = core.PlaybackController(backend=self, provider=playback_provider) stored_playlists_provider = SpotifyStoredPlaylistsProvider( backend=self) self.stored_playlists = core.StoredPlaylistsController( backend=self, provider=stored_playlists_provider) self.uri_schemes = [u'spotify'] self.audio = None self.spotify = None # Fail early if settings are not present self.username = settings.SPOTIFY_USERNAME self.password = settings.SPOTIFY_PASSWORD
def __init__(self, *args, **kwargs): super(DummyBackend, self).__init__(*args, **kwargs) self.current_playlist = core.CurrentPlaylistController(backend=self) library_provider = DummyLibraryProvider(backend=self) self.library = core.LibraryController(backend=self, provider=library_provider) playback_provider = DummyPlaybackProvider(backend=self) self.playback = core.PlaybackController(backend=self, provider=playback_provider) stored_playlists_provider = DummyStoredPlaylistsProvider(backend=self) self.stored_playlists = core.StoredPlaylistsController( backend=self, provider=stored_playlists_provider) self.uri_schemes = [u'dummy']
def __init__(self, *args, **kwargs): super(LocalBackend, self).__init__(*args, **kwargs) self.current_playlist = core.CurrentPlaylistController(backend=self) library_provider = LocalLibraryProvider(backend=self) self.library = core.LibraryController(backend=self, provider=library_provider) playback_provider = base.BasePlaybackProvider(backend=self) self.playback = LocalPlaybackController(backend=self, provider=playback_provider) stored_playlists_provider = LocalStoredPlaylistsProvider(backend=self) self.stored_playlists = core.StoredPlaylistsController( backend=self, provider=stored_playlists_provider) self.uri_schemes = [u'file'] self.audio = None