Skip to content

The Free Software Media System - Server Backend & API

Fix InvalidOperationException when serializing MediaPathInfo

Bond_009b458f85c47e5
diff --git a/MediaBrowser.Model/Configuration/MediaPathInfo.cs b/MediaBrowser.Model/Configuration/MediaPathInfo.cs
index d096defcb8..a7bc435901 100644
--- a/MediaBrowser.Model/Configuration/MediaPathInfo.cs
+++ b/MediaBrowser.Model/Configuration/MediaPathInfo.cs
@@ -9,6 +9,12 @@ namespace MediaBrowser.Model.Configuration
Path = path;
}
+ // Needed for xml serialization
+ public MediaPathInfo()
+ {
+ Path = string.Empty;
+ }
+
public string Path { get; set; }
public string? NetworkPath { get; set; }