Search in sources :

Example 1 with SpotifyRedirectService

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

the class HollowYouTubeVideo method fetch.

@Override
public Playable fetch() {
    // only supported for Spotify redirect as YouTube does not allow loading specific playlist items
    if (isHollow() && redirectedSpotifyTrack != null) {
        markLoading();
        EagerFetchQueue.submitFetch(() -> StaticSessionProvider.consumeSession((CheckedConsumer<Session>) session -> {
            SpotifyRedirectService spotifyRedirectService = new SpotifyRedirectService(session, youTubeService);
            spotifyRedirectService.redirectTrack(this);
        }));
    }
    return this;
}
Also used : SpotifyRedirectService(net.robinfriedli.aiode.audio.spotify.SpotifyRedirectService) CheckedConsumer(net.robinfriedli.aiode.function.CheckedConsumer)

Aggregations

SpotifyRedirectService (net.robinfriedli.aiode.audio.spotify.SpotifyRedirectService)1 CheckedConsumer (net.robinfriedli.aiode.function.CheckedConsumer)1