Skip to content

Commit

Permalink
Update for Twitch-API change
Browse files Browse the repository at this point in the history
  • Loading branch information
s1mpl3x committed Dec 12, 2014
1 parent c3f7907 commit 0e3bab3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/eu/over9000/skadi/stream/StreamRetriever.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public static StreamDataset getStreams(final Channel channel) {
final String token = parsedTokenResponse.get("token").getAsString();
final String sig = parsedTokenResponse.get("sig").getAsString();

final String vidURL = "http://usher.twitch.tv/select/" + channelname + ".json?nauthsig=" + sig
+ "&nauth=" + URLEncoder.encode(token, "UTF-8") + "&allow_source=true";
final String vidURL = "http://usher.twitch.tv/api/channel/hls/" + channelname + ".m3u8?sig=" + sig
+ "&token=" + URLEncoder.encode(token, "UTF-8") + "&allow_source=true";

final String vidResponse = HttpUtil.getAPIResponse(vidURL);

Expand All @@ -73,7 +73,7 @@ public static StreamDataset getStreams(final Channel channel) {

return new StreamDataset(channel, quals);
} catch (final URISyntaxException | IOException e) {
SkadiLogging.log("failed to retrieve stream on try " + tryCount);
SkadiLogging.log("failed to retrieve stream on try " + tryCount + ", reason: " + e.getMessage());
continue;
}
}
Expand Down

0 comments on commit 0e3bab3

Please sign in to comment.