public Stats(List<KeyValuePair<string, string>> keyValuePair)
{
if (keyValuePair == null) return;
foreach (var kv in keyValuePair)
{
switch (kv.Key)
{
case "artists":
this.Artists = kv.Value;
break;
case "albums":
this.Albums = kv.Value;
break;
case "songs":
this.Songs = kv.Value;
break;
case "uptime":
this.Uptime = kv.Value;
break;
case "db_playtime":
this.DbPlaytime = kv.Value;
break;
case "db_update":
this.DbUpdate = kv.Value;
break;
case "playtime":
this.Playtime = kv.Value;
break;
default:
break;
}
}
}