2016-10-26 11:25:03 -07:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using MediaBrowser.Common.Configuration;
|
2014-08-10 15:13:17 -07:00
|
|
|
|
using MediaBrowser.Model.Providers;
|
|
|
|
|
|
2016-10-26 11:25:03 -07:00
|
|
|
|
namespace MediaBrowser.MediaEncoding.Subtitles
|
2014-08-10 15:13:17 -07:00
|
|
|
|
{
|
|
|
|
|
public static class ConfigurationExtension
|
|
|
|
|
{
|
|
|
|
|
public static SubtitleOptions GetSubtitleConfiguration(this IConfigurationManager manager)
|
|
|
|
|
{
|
|
|
|
|
return manager.GetConfiguration<SubtitleOptions>("subtitles");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SubtitleConfigurationFactory : IConfigurationFactory
|
|
|
|
|
{
|
|
|
|
|
public IEnumerable<ConfigurationStore> GetConfigurations()
|
|
|
|
|
{
|
|
|
|
|
return new List<ConfigurationStore>
|
|
|
|
|
{
|
|
|
|
|
new ConfigurationStore
|
|
|
|
|
{
|
|
|
|
|
Key = "subtitles",
|
|
|
|
|
ConfigurationType = typeof (SubtitleOptions)
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|