You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Model.FileOrganization;
|
|
using System.Collections.Generic;
|
|
|
|
namespace MediaBrowser.Server.Implementations.FileOrganization
|
|
{
|
|
public static class ConfigurationExtension
|
|
{
|
|
public static AutoOrganizeOptions GetAutoOrganizeOptions(this IConfigurationManager manager)
|
|
{
|
|
return manager.GetConfiguration<AutoOrganizeOptions>("autoorganize");
|
|
}
|
|
public static void SaveAutoOrganizeOptions(this IConfigurationManager manager, AutoOrganizeOptions options)
|
|
{
|
|
manager.SaveConfiguration("autoorganize", options);
|
|
}
|
|
}
|
|
|
|
public class AutoOrganizeOptionsFactory : IConfigurationFactory
|
|
{
|
|
public IEnumerable<ConfigurationStore> GetConfigurations()
|
|
{
|
|
return new List<ConfigurationStore>
|
|
{
|
|
new ConfigurationStore
|
|
{
|
|
Key = "autoorganize",
|
|
ConfigurationType = typeof (AutoOrganizeOptions)
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|