Skip to content

Commit

Permalink
Always throw on bad playabilityStatus if status != null, TVHTML5EMBED…
Browse files Browse the repository at this point in the history
…DED's isEmbedded() should return true.
  • Loading branch information
devoxin committed Sep 22, 2024
1 parent 9981e45 commit f64f795
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ protected void extractPlaylistTracks(@NotNull JsonBrowser json,
}
}

@Override
public boolean isEmbedded() {
return true;
}

@Override
@NotNull
public String getPlayerParams() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ protected JsonBrowser loadTrackInfoFromInnertube(@NotNull YoutubeAudioSourceMana

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

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

0 comments on commit f64f795

Please sign in to comment.