aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Channels/ChannelConfigurations.cs
blob: ef0973e7f41ebc6d1993ba56153714c8b2da0eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Configuration;
using System.Collections.Generic;

namespace Emby.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)
                }
            };
        }
    }
}