public void AddBroadcastHistory(JObject info)
{
var obj = new PeerCastStation.UI.BroadcastInfo();
info.TryGetThen("streamType", v => obj.StreamType = v);
info.TryGetThen("streamUrl", v => obj.StreamUrl = v);
info.TryGetThen("bitrate", v => obj.Bitrate = v);
info.TryGetThen("contentType", v => obj.ContentType = v);
info.TryGetThen("yellowPage", v => obj.YellowPage = v);
info.TryGetThen("channelName", v => obj.ChannelName = v);
info.TryGetThen("genre", v => obj.Genre = v);
info.TryGetThen("description", v => obj.Description = v);
info.TryGetThen("comment", v => obj.Comment = v);
info.TryGetThen("contactUrl", v => obj.ContactUrl = v);
info.TryGetThen("trackTitle", v => obj.TrackTitle = v);
info.TryGetThen("trackAlbum", v => obj.TrackAlbum = v);
info.TryGetThen("trackArtist", v => obj.TrackArtist = v);
info.TryGetThen("trackGenre", v => obj.TrackGenre = v);
info.TryGetThen("trackUrl", v => obj.TrackUrl = v);
info.TryGetThen("favorite", v => obj.Favorite = v);
var settings = PeerCastApplication.Current.Settings.Get<UISettings>();
var item = settings.FindBroadcastHistroryItem(obj);
if (item!=null) {
info.TryGetThen("favorite", v => item.Favorite = v);
}
else {
settings.AddBroadcastHistory(obj);
}
}