From 0e3bab349b498abd15bd68e9fcffec14b3ce3c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Strau=C3=9F?= Date: Fri, 12 Dec 2014 16:47:22 +0100 Subject: [PATCH] Update for Twitch-API change --- src/main/java/eu/over9000/skadi/stream/StreamRetriever.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/over9000/skadi/stream/StreamRetriever.java b/src/main/java/eu/over9000/skadi/stream/StreamRetriever.java index d17e185..145a326 100644 --- a/src/main/java/eu/over9000/skadi/stream/StreamRetriever.java +++ b/src/main/java/eu/over9000/skadi/stream/StreamRetriever.java @@ -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); @@ -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; } }