aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins/PluginManager.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2020-12-22 14:07:01 +0000
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2020-12-22 14:07:01 +0000
commit621e6d28cda49fac580cf8c9c672b5fdfd3f743b (patch)
tree98c2eb40376559d081962171f9b91390b97f8e32 /Emby.Server.Implementations/Plugins/PluginManager.cs
parent3633996a53385d78601df33286b47415475ae3bb (diff)
Fallback to default guid
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index b46c19995..33faa5e9d 100644
--- a/Emby.Server.Implementations/Plugins/PluginManager.cs
+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs
@@ -51,8 +51,18 @@ namespace Emby.Server.Implementations.Plugins
_pluginsPath = pluginsPath;
_appVersion = appVersion ?? throw new ArgumentNullException(nameof(appVersion));
_jsonOptions = JsonDefaults.GetOptions();
- _jsonOptions.Converters.Add(new JsonGuidDashConverter());
_jsonOptions.WriteIndented = true;
+
+ // We need to use the default GUID converter, so we need to remove any custom ones.
+ for (int a = _jsonOptions.Converters.Count - 1; a >= 0; a--)
+ {
+ if (_jsonOptions.Converters[a] is JsonGuidConverter convertor)
+ {
+ _jsonOptions.Converters.Remove(convertor);
+ break;
+ }
+ }
+
_config = config;
_appHost = appHost;
_minimumVersion = new Version(0, 0, 0, 1);