mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 04:18:06 +02:00
29 lines
841 B
C#
29 lines
841 B
C#
using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Model.Providers;
|
|
using System.Collections.Generic;
|
|
|
|
namespace MediaBrowser.Providers.Subtitles
|
|
{
|
|
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)
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|