Skip to content

Commit

Permalink
- Fixed "Error occurred while loading settings." MediaPortalIptvFilte…
Browse files Browse the repository at this point in the history
…rAndUrlSourceSplitter.xml not found
  • Loading branch information
doskabouter committed Mar 8, 2021
1 parent a7828e3 commit e0d2ca1
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -5,6 +5,7 @@
using System.Xml.Serialization;
using System.IO;
using System.Collections;
using TvLibrary.Log;

namespace TvEngine.MediaPortalIptvFilterAndUrlSourceSplitter
{
Expand Down Expand Up @@ -116,6 +117,11 @@ public int StreamAnalysisTimeout
public static Settings Load()
{
String configFilePath = Path.Combine(TvLibrary.Interfaces.PathManager.GetDataPath, Settings.ConfigurationFileName);
if (!File.Exists(configFilePath))
{
Log.Info("File {0} not found, settings set to default", configFilePath);
return new Settings();
}

XmlSerializer serializer = new XmlSerializer(typeof(Settings));
using (FileStream stream = new FileStream(configFilePath, FileMode.Open, FileAccess.Read))
Expand Down

0 comments on commit e0d2ca1

Please sign in to comment.