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;
}
Aggregations