ChrisRichner / ARGUS-TV-GuideEnhancer

Electronic Program Guide Enhancer for Argus TV
https://code.google.com/p/ftr-guide-enhancer/
Apache License 2.0
1 stars 3 forks source link

Don't let the whole update fail when one episode doesn't match and faces an error #8

Closed ChrisRichner closed 9 years ago

ChrisRichner commented 9 years ago

I am running 2.3 for both Argus and GE. I have two shows that are not returning episode matches. One because it is not being updated at the TVdb. I have no problem ignoring that one. The other was working till this last episode. I am not sure why the direct title match is not working. They look the same to me. I will post the error below, but my main question / feature request / bug report is instead of having the whole update fail when one episode doesn't match, can't GE just skip updating that one episode? This also causes a problem when I try and record the local news.

http://www.argus-tv.com/forum/viewtopic.php?f=76&t=4003&start=130#p35635

2015-01-25 17:28:14 [46] ERROR GuideEnricher.Service - Error enriching
System.ArgumentNullException: Value cannot be null.
Parameter name: input
   at System.Text.RegularExpressions.Regex.Match(String input)
   at GuideEnricher.EpisodeMatchMethods.InQuotesInDescriptionMatchMethod.Match(GuideEnricherProgram enrichedGuideProgram, List`1 episodes)
   at GuideEnricher.tvdb.TvdbLibAccess.EnrichProgram(GuideEnricherProgram existingProgram, TvdbSeries tvdbSeries)
   at GuideEnricher.Enricher.EnrichProgramsInSeries(GuideEnricherSeries series, TvdbSeries OnlineSeries)
   at GuideEnricher.Enricher.EnrichSeries(GuideEnricherSeries series)
   at GuideEnricher.Enricher.EnrichUpcomingPrograms()
   at GuideEnricher.Service.Enrich(Object state, ElapsedEventArgs eventArgs)
Malyngo commented 9 years ago

This error occurs when the enrichedGuideProgram.Description is null. So there should be an additional check before the RegularExpression's match method is called to check if the Description ist null. Such a fix should be applied to the FirstSentenceInDescriptionMatchMethod and the InQuotesInDescriptionMatchMethod, as both are using a regular expression on the Description

ChrisRichner commented 9 years ago

Hi Malyngo

Thanks for your contribution! I will fix a new release asap.