public Config() { postProcess = new PostProcess(); //Default postProcess object retry = new Retry(); channels = new List <Channel>(); period = new Period(); }
void OnDeserialized(StreamingContext c) { if (postProcess == null) { postProcess = new PostProcess(); } if (retry == null) { retry = new Retry(); } if (period == null) { period = new Period(); } epgFileName = Path.GetFileName(outputFilePath); // Set update type to channels with missing update type foreach (var channel in GetChannels(includeOffset: true)) { activeChannels++; if (channel.update == null && !channel.IsTimeshifted) { channel.update = UpdateType.None; Log.Error("Channel '" + channel.name + "' has no update type. Update set to None!"); activeChannels--; } if (channel.siteinis == null && !channel.IsTimeshifted) { Log.Error("Channel '" + channel.name + "' has no siteinis!"); channel.siteinis = new List <SiteIni>(); } } }