Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/Mediaportal/MP1-5073_Error_proc…
Browse files Browse the repository at this point in the history
…essing_xml_with_dtd_in_it' into MP_1.28_Final_Test2
  • Loading branch information
andrewjswan committed Jun 14, 2021
2 parents 99f8620 + d42fbf0 commit 50471a5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions TvEngine3/TVLibrary/Plugins/XmlTvImport/XMLTVImport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,18 @@ public bool Import(string fileName, bool deleteBeforeImport, bool showProgress)

//TVDatabase.SupressEvents = true;
bool useTimeZone = layer.GetSetting("xmlTvUseTimeZone", "false").Value == "true";
int hours = Int32.Parse(layer.GetSetting("xmlTvTimeZoneHours", "0").Value);
int mins = Int32.Parse(layer.GetSetting("xmlTvTimeZoneMins", "0").Value);
int hours;
if (!Int32.TryParse(layer.GetSetting("xmlTvTimeZoneHours", "0").Value, out hours))
{
Log.Error("xmltv: xmlTvTimeZoneHours not a valid integer: {0}", layer.GetSetting("xmlTvTimeZoneHours", "0").Value);
hours = 0;
};
int mins;
if (!Int32.TryParse(layer.GetSetting("xmlTvTimeZoneMins", "0").Value, out mins))
{
Log.Error("xmltv: xmlTvTimeZoneMins not a valid integer: {0}", layer.GetSetting("xmlTvTimeZoneMins", "0").Value);
mins = 0;
}
int timeZoneCorrection = hours * 60 + mins;
_skipTextProcessing = layer.GetSetting("xmlTvNoTextMod", "false").Value == "true";

Expand Down

0 comments on commit 50471a5

Please sign in to comment.