Fix bug with LastWiki

sometimes it will throw a formatexception when parsing the published
property
This commit is contained in:
Harry 2014-12-17 12:53:47 -04:00
parent 38932a19c0
commit 6516dac271

View File

@ -20,13 +20,18 @@ public class LastWiki : ILastfmObject
internal static LastWiki ParseJToken(JToken token)
{
return new LastWiki
var wiki = new LastWiki
{
Published = token.Value<DateTime>("published"),
Summary = token.Value<string>("summary").Trim(),
Content = token.Value<string>("content").Trim(),
YearFormed = token.Value<int>("yearformed")
};
try
{
wiki.Published = token.Value<DateTime>("published");
}
catch { }
return wiki;
}
}
}