From 89dd4f0be1721ef8f8357051cafea2703ab38b2e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 13 Aug 2016 23:12:26 -0400 Subject: save library options on dialog close --- MediaBrowser.Controller/Entities/CollectionFolder.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Controller/Entities/CollectionFolder.cs') diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index b81f021da..e120f2e23 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -95,9 +95,19 @@ namespace MediaBrowser.Controller.Entities return System.IO.Path.Combine(path, "options.xml"); } + public void UpdateLibraryOptions(LibraryOptions options) + { + SaveLibraryOptions(Path, options); + } + public static void SaveLibraryOptions(string path, LibraryOptions options) { - XmlSerializer.SerializeToFile(options, GetLibraryOptionsPath(path)); + lock (LibraryOptions) + { + LibraryOptions[path] = options; + + XmlSerializer.SerializeToFile(options, GetLibraryOptionsPath(path)); + } } /// -- cgit v1.2.3