You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
1.1 KiB
25 lines
1.1 KiB
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Controller.Configuration;
|
|
using MediaBrowser.Model.Configuration;
|
|
|
|
namespace MediaBrowser.Controller.Library
|
|
{
|
|
public static class MetadataConfigurationExtensions
|
|
{
|
|
public static MetadataConfiguration GetMetadataConfiguration(this IConfigurationManager config)
|
|
=> config.GetConfiguration<MetadataConfiguration>("metadata");
|
|
|
|
/// <summary>
|
|
/// Gets the <see cref="MetadataOptions" /> for the specified type.
|
|
/// </summary>
|
|
/// <param name="config">The <see cref="IServerConfigurationManager"/>.</param>
|
|
/// <param name="type">The type to get the <see cref="MetadataOptions" /> for.</param>
|
|
/// <returns>The <see cref="MetadataOptions" /> for the specified type or <c>null</c>.</returns>
|
|
public static MetadataOptions? GetMetadataOptionsForType(this IServerConfigurationManager config, string type)
|
|
=> Array.Find(config.Configuration.MetadataOptions, i => string.Equals(i.ItemType, type, StringComparison.OrdinalIgnoreCase));
|
|
}
|
|
}
|