Search in sources :

Example 1 with SpotifyUri

use of net.robinfriedli.aiode.audio.spotify.SpotifyUri in project aiode by robinfriedli.

the class AbstractPlayableLoadingCommand method loadSpotifyUri.

private void loadSpotifyUri(AudioManager audioManager) throws Exception {
    SpotifyUri spotifyUri = SpotifyUri.parse(getCommandInput());
    SpotifyService spotifyService = getContext().getSpotifyService();
    PlayableFactory playableFactory = audioManager.createPlayableFactory(getSpotifyService(), trackLoadingExecutor);
    List<Playable> playables = spotifyUri.loadPlayables(playableFactory, spotifyService, shouldRedirectSpotify(), mayInterrupt);
    handleResults(playables);
    loadedAmount = playables.size();
}
Also used : PlayableFactory(net.robinfriedli.aiode.audio.PlayableFactory) UrlPlayable(net.robinfriedli.aiode.audio.UrlPlayable) Playable(net.robinfriedli.aiode.audio.Playable) SpotifyUri(net.robinfriedli.aiode.audio.spotify.SpotifyUri) SpotifyService(net.robinfriedli.aiode.audio.spotify.SpotifyService)

Aggregations

Playable (net.robinfriedli.aiode.audio.Playable)1 PlayableFactory (net.robinfriedli.aiode.audio.PlayableFactory)1 UrlPlayable (net.robinfriedli.aiode.audio.UrlPlayable)1 SpotifyService (net.robinfriedli.aiode.audio.spotify.SpotifyService)1 SpotifyUri (net.robinfriedli.aiode.audio.spotify.SpotifyUri)1