Skip to content

Commit

Permalink
Fix bad twitch vod urls returned from twitch v3 api #24
Browse files Browse the repository at this point in the history
  • Loading branch information
laurencee committed Feb 3, 2017
1 parent 96ebf75 commit a22cd76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("2.9.0.0")]
[assembly: AssemblyFileVersion("2.9.0.0")]
[assembly: AssemblyVersion("2.9.1.0")]
[assembly: AssemblyFileVersion("2.9.1.0")]
5 changes: 4 additions & 1 deletion Livestream.Monitor/Model/ApiClients/TwitchApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ public async Task<List<VodDetails>> GetVods(VodQuery vodQuery)
var channelVideos = await twitchTvClient.GetChannelVideos(channelVideosQuery);
var vods = channelVideos.Select(channelVideo => new VodDetails
{
Url = channelVideo.Url,
// hack to correct the url path for twitch videos see github issue: https://github.com/laurencee/Livestream.Monitor/issues/24
// was previously twitch.tv/videos/XXXXXXX
// now is twitch.tv/user/v/XXXXXXX
Url = channelVideo.Url.Replace(@"twitch.tv/videos/", @"twitch.tv/user/v/"),
Length = TimeSpan.FromSeconds(channelVideo.Length),
RecordedAt = channelVideo.RecordedAt ?? DateTimeOffset.MinValue,
Views = channelVideo.Views,
Expand Down

0 comments on commit a22cd76

Please sign in to comment.