|
|
|
@ -4,9 +4,11 @@ using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text.Json;
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using MediaBrowser.Common.Json;
|
|
|
|
|
using MediaBrowser.Controller.IO;
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
|
using MediaBrowser.Controller.Providers;
|
|
|
|
@ -26,8 +28,6 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
|
{
|
|
|
|
|
public static IXmlSerializer XmlSerializer { get; set; }
|
|
|
|
|
|
|
|
|
|
public static IJsonSerializer JsonSerializer { get; set; }
|
|
|
|
|
|
|
|
|
|
public static IServerApplicationHost ApplicationHost { get; set; }
|
|
|
|
|
|
|
|
|
|
public CollectionFolder()
|
|
|
|
@ -122,7 +122,8 @@ namespace MediaBrowser.Controller.Entities
|
|
|
|
|
{
|
|
|
|
|
LibraryOptions[path] = options;
|
|
|
|
|
|
|
|
|
|
var clone = JsonSerializer.DeserializeFromString<LibraryOptions>(JsonSerializer.SerializeToString(options));
|
|
|
|
|
var jsonOptions = JsonDefaults.GetOptions();
|
|
|
|
|
var clone = JsonSerializer.Deserialize<LibraryOptions>(JsonSerializer.Serialize(options, jsonOptions), jsonOptions);
|
|
|
|
|
foreach (var mediaPath in clone.PathInfos)
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(mediaPath.Path))
|
|
|
|
|