private void ScanForRequiredLogos() { ITVAccessService tas = TVAccessService.Instance; if (!tas.TestConnectionToTVService()) { return; } channelLogosRequired = tas.GetChannelsBasic() .Where(ch => logos.FindLocation(ch.Title) == null) .ToList(); }
private void Init() { // load list of channel logos that we don't have yet logos = new ChannelLogos(); ITVAccessService tas = TVAccessService.Instance; if (!tas.TestConnectionToTVService()) { return; } channelLogosRequired = tas.GetChannelsBasic() .Where(ch => logos.FindLocation(ch.Title) == null) .ToList(); // exit if we already got all logos if (channelLogosRequired.Count == 0) { Log.Trace("All channel logos already available, not downloading any..."); return; } // try downloading them on starting and exit if successful if (PerformCheck()) { return; } // setup timer backgroundTimer = new Timer() { AutoReset = true, Interval = 60 * 60 * 1000, }; backgroundTimer.Elapsed += new ElapsedEventHandler(TimerElapsed); backgroundTimer.Start(); }