Skip to content

Commit f64f795

Browse files
committed
Always throw on bad playabilityStatus if status != null, TVHTML5EMBEDDED's isEmbedded() should return true.
1 parent 9981e45 commit f64f795

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

common/src/main/java/dev/lavalink/youtube/clients/TvHtml5Embedded.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ protected void extractPlaylistTracks(@NotNull JsonBrowser json,
7777
}
7878
}
7979

80+
@Override
81+
public boolean isEmbedded() {
82+
return true;
83+
}
84+
8085
@Override
8186
@NotNull
8287
public String getPlayerParams() {

common/src/main/java/dev/lavalink/youtube/clients/skeleton/NonMusicClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ protected JsonBrowser loadTrackInfoFromInnertube(@NotNull YoutubeAudioSourceMana
106106

107107
JsonBrowser json = loadJsonResponse(httpInterface, request, "player api response");
108108
JsonBrowser playabilityJson = json.get("playabilityStatus");
109-
PlayabilityStatus playabilityStatus = getPlayabilityStatus(playabilityJson, false);
109+
// fix: Make this method throw if a status was supplied (typically when we recurse).
110+
PlayabilityStatus playabilityStatus = getPlayabilityStatus(playabilityJson, status != null);
110111

111112
// All other branches should've been caught by getPlayabilityStatus().
112113
// An exception will be thrown if we can't handle it.

0 commit comments

Comments
 (0)