save library options on dialog close

This commit is contained in:
Luke Pulverenti
2016-08-13 23:12:26 -04:00
parent 7dbeeadea6
commit 89dd4f0be1
4 changed files with 33 additions and 8 deletions

View File

@@ -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));
}
}
/// <summary>

View File

@@ -110,8 +110,7 @@ namespace MediaBrowser.Controller.Entities.Movies
{
get
{
// TODO
return false;
return !FileSystem.ContainsSubPath(ConfigurationManager.ApplicationPaths.DataPath, Path);
}
}