Skip to content

Commit

Permalink
Fix incorrect parsing in Leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
wooferzfg committed Aug 15, 2015
1 parent 5c86f92 commit 36a1583
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions SpeedrunComSharp/Leaderboards/Leaderboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static Leaderboard Parse(SpeedrunComClient client, dynamic leaderboardEle
}
else if (properties["platform"] is string)
{
leaderboard.PlatformIDOfFilter = properties["platform"].data;
leaderboard.PlatformIDOfFilter = properties["platform"] as string;
leaderboard.platformFilter = new Lazy<Platform>(() => client.Platforms.GetPlatform(leaderboard.PlatformIDOfFilter));
}
else
Expand All @@ -156,7 +156,7 @@ public static Leaderboard Parse(SpeedrunComClient client, dynamic leaderboardEle
}
else if (properties["region"] is string)
{
leaderboard.RegionIDOfFilter = properties["region"].data;
leaderboard.RegionIDOfFilter = properties["region"] as string;
leaderboard.regionFilter = new Lazy<Region>(() => client.Regions.GetRegion(leaderboard.RegionIDOfFilter));
}
else
Expand Down
4 changes: 2 additions & 2 deletions SpeedrunComSharp/SpeedrunComClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ internal dynamic DoRequest(Uri uri)
if (Cache.ContainsKey(uri))
{
#if DEBUG_WITH_API_CALLS
Console.WriteLine(uri.AbsoluteUri, "Cached API Call");
Console.WriteLine("Cached API Call: {0}", uri.AbsoluteUri);
#endif
result = Cache[uri];
Cache.Remove(uri);
}
else
{
#if DEBUG_WITH_API_CALLS
Console.WriteLine(uri.AbsoluteUri, "Uncached API Call");
Console.WriteLine("Uncached API Call: {0}", uri.AbsoluteUri);
#endif
try
{
Expand Down

0 comments on commit 36a1583

Please sign in to comment.