NfoOptions.cs 859 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections.Generic;
  2. using MediaBrowser.Common.Configuration;
  3. using MediaBrowser.Model.Configuration;
  4. namespace MediaBrowser.XbmcMetadata.Configuration
  5. {
  6. public class ConfigurationFactory : IConfigurationFactory
  7. {
  8. /// <inheritdoc />
  9. public IEnumerable<ConfigurationStore> GetConfigurations()
  10. {
  11. return new[]
  12. {
  13. new ConfigurationStore
  14. {
  15. ConfigurationType = typeof(XbmcMetadataOptions),
  16. Key = "xbmcmetadata"
  17. }
  18. };
  19. }
  20. }
  21. public static class ConfigurationExtension
  22. {
  23. public static XbmcMetadataOptions GetNfoConfiguration(this IConfigurationManager manager)
  24. {
  25. return manager.GetConfiguration<XbmcMetadataOptions>("xbmcmetadata");
  26. }
  27. }
  28. }