jellyfin/MediaBrowser.Server.Implementations/Channels/ChannelConfigurations.cs
2014-06-30 13:40:46 -04:00

30 lines
858 B
C#

using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Configuration;
using System.Collections.Generic;
namespace MediaBrowser.Server.Implementations.Channels
{
public static class ChannelConfigurationExtension
{
public static ChannelOptions GetChannelsConfiguration(this IConfigurationManager manager)
{
return manager.GetConfiguration<ChannelOptions>("channels");
}
}
public class ChannelConfigurationFactory : IConfigurationFactory
{
public IEnumerable<ConfigurationStore> GetConfigurations()
{
return new List<ConfigurationStore>
{
new ConfigurationStore
{
Key = "channels",
ConfigurationType = typeof (ChannelOptions)
}
};
}
}
}