jellyfin/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs

30 lines
845 B
C#
Raw Normal View History

using System.Collections.Generic;
using MediaBrowser.Common.Configuration;
2014-08-10 15:13:17 -07:00
using MediaBrowser.Model.Providers;
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)
}
};
}
}
}