Skip to content

Commit

Permalink
Only init headers after matching Twitch channel
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Apr 23, 2024
1 parent 7c808a2 commit dc348ea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ public String getSourceName() {

@Override
public AudioItem loadItem(AudioPlayerManager manager, AudioReference reference) {
initRequestHeaders();

String streamName = getChannelIdentifierFromUrl(reference.identifier);

if (streamName == null) {
return null;
}

initRequestHeaders();

JsonBrowser channelInfo = fetchStreamChannelInfo(streamName).get("data").get("user");

if (channelInfo == null || channelInfo.get("stream").get("type").isNull()) {
Expand Down

0 comments on commit dc348ea

Please sign in to comment.