mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-17 07:13:09 +01:00
Fix bug with LastWiki
sometimes it will throw a formatexception when parsing the published property
This commit is contained in:
parent
38932a19c0
commit
6516dac271
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user