| | | 1 | | #pragma warning disable CS1591 |
| | | 2 | | |
| | | 3 | | using System; |
| | | 4 | | using MediaBrowser.Common.Configuration; |
| | | 5 | | using MediaBrowser.Controller.Configuration; |
| | | 6 | | using MediaBrowser.Model.Configuration; |
| | | 7 | | |
| | | 8 | | namespace MediaBrowser.Controller.Library |
| | | 9 | | { |
| | | 10 | | public static class MetadataConfigurationExtensions |
| | | 11 | | { |
| | | 12 | | public static MetadataConfiguration GetMetadataConfiguration(this IConfigurationManager config) |
| | 49 | 13 | | => config.GetConfiguration<MetadataConfiguration>("metadata"); |
| | | 14 | | |
| | | 15 | | /// <summary> |
| | | 16 | | /// Gets the <see cref="MetadataOptions" /> for the specified type. |
| | | 17 | | /// </summary> |
| | | 18 | | /// <param name="config">The <see cref="IServerConfigurationManager"/>.</param> |
| | | 19 | | /// <param name="type">The type to get the <see cref="MetadataOptions" /> for.</param> |
| | | 20 | | /// <returns>The <see cref="MetadataOptions" /> for the specified type or <c>null</c>.</returns> |
| | | 21 | | public static MetadataOptions? GetMetadataOptionsForType(this IServerConfigurationManager config, string type) |
| | 1242 | 22 | | => Array.Find(config.Configuration.MetadataOptions, i => string.Equals(i.ItemType, type, StringComparison.Or |
| | | 23 | | } |
| | | 24 | | } |