diff --git a/TwitchDownloaderWPF/InfoHelper.cs b/TwitchDownloaderWPF/InfoHelper.cs index 01c68b1a..c2a024ff 100644 --- a/TwitchDownloaderWPF/InfoHelper.cs +++ b/TwitchDownloaderWPF/InfoHelper.cs @@ -30,8 +30,9 @@ public static async Task GetVideoInfo(int videoId) using (WebClient client = new WebClient()) { client.Encoding = Encoding.UTF8; + client.Headers.Add("Accept", "application/vnd.twitchtv.v5+json"); client.Headers.Add("Client-ID", "kimne78kx3ncx6brgo4mv6wki5h1ko"); - string response = await client.DownloadStringTaskAsync("https://api.twitch.tv/helix/videos?id=" + videoId); + string response = await client.DownloadStringTaskAsync("https://api.twitch.tv/kraken/videos/" + videoId); JObject result = JObject.Parse(response); return result; } @@ -61,18 +62,6 @@ public static async Task GetVideoPlaylist(int videoId, string token, s } public static async Task GetClipInfo(object clipId) - { - using (WebClient client = new WebClient()) - { - client.Encoding = Encoding.UTF8; - client.Headers.Add("Client-ID", "kimne78kx3ncx6brgo4mv6wki5h1ko"); - string response = await client.DownloadStringTaskAsync(String.Format("https://api.twitch.tv/helix/clips?id={0}", clipId)); - JObject result = JObject.Parse(response); - return result; - } - } - - public static async Task GetClipInfoChat(object clipId) { using (WebClient client = new WebClient()) { diff --git a/TwitchDownloaderWPF/MainWindow.xaml b/TwitchDownloaderWPF/MainWindow.xaml index 9adee6b2..4a0b2475 100644 --- a/TwitchDownloaderWPF/MainWindow.xaml +++ b/TwitchDownloaderWPF/MainWindow.xaml @@ -18,12 +18,14 @@ +