Add premier date to artist

This commit is contained in:
Eric Reed 2013-03-05 10:45:25 -05:00
parent 795a6ccd9e
commit 09ec5670aa

View File

@ -14,6 +14,21 @@ namespace MediaBrowser.Controller.Providers.Music
public static void ProcessArtistData(BaseItem artist, LastfmArtist data) public static void ProcessArtistData(BaseItem artist, LastfmArtist data)
{ {
artist.Overview = data.bio != null ? data.bio.content : null; artist.Overview = data.bio != null ? data.bio.content : null;
var yearFormed = 0;
try
{
yearFormed = Convert.ToInt32(data.bio.yearformed);
}
catch (FormatException)
{
}
catch (NullReferenceException)
{
}
catch (OverflowException)
{
}
artist.PremiereDate = new DateTime(yearFormed, 1,1);
if (data.tags != null) if (data.tags != null)
{ {
foreach (var tag in data.tags.tag) foreach (var tag in data.tags.tag)