Skip to content

Commit

Permalink
Map language to broadcaster language instead, we only care about what…
Browse files Browse the repository at this point in the history
… language is being spoken on the stream.

Issue #2

Added missing json property mapping for Channel.BroadcasterLanguage
  • Loading branch information
laurencee committed Jan 15, 2016
1 parent 76a9482 commit c0090f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Livestream.Monitor/Model/TwitchToModelMaps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static LivestreamModel ToLivestreamModel(this Follow follow, string impor
Game = follow.Channel?.Game,
IsPartner = follow.Channel?.Partner != null && follow.Channel.Partner.Value,
ImportedBy = importedBy,
Language = follow.Channel?.Language
Language = follow.Channel?.BroadcasterLanguage
};
}

Expand Down Expand Up @@ -77,7 +77,7 @@ public static void PopulateWithChannel(this LivestreamModel livestreamModel, Cha
livestreamModel.Description = channel.Status;
livestreamModel.Game = channel.Game;
livestreamModel.IsPartner = channel.Partner.HasValue && channel.Partner.Value;
livestreamModel.Language = channel.Language;
livestreamModel.Language = channel.BroadcasterLanguage;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions TwitchTv/Dto/Channel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class Channel

public object Banner { get; set; }

[JsonProperty("broadcaster_language")]
public string BroadcasterLanguage { get; set; }

[JsonProperty("display_name")]
Expand Down

0 comments on commit c0090f6

Please sign in to comment.