repo creation with initial code after cloning public repo
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
|
||||
namespace Jellyfin.LiveTv.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IConfigurationManager"/> extensions for Live TV.
|
||||
/// </summary>
|
||||
public static class LiveTvConfigurationExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="LiveTvOptions"/>.
|
||||
/// </summary>
|
||||
/// <param name="configurationManager">The <see cref="IConfigurationManager"/>.</param>
|
||||
/// <returns>The <see cref="LiveTvOptions"/>.</returns>
|
||||
public static LiveTvOptions GetLiveTvConfiguration(this IConfigurationManager configurationManager)
|
||||
=> configurationManager.GetConfiguration<LiveTvOptions>("livetv");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="XbmcMetadataOptions"/>.
|
||||
/// </summary>
|
||||
/// <param name="configurationManager">The <see cref="IConfigurationManager"/>.</param>
|
||||
/// <returns>The <see cref="XbmcMetadataOptions"/>.</returns>
|
||||
public static XbmcMetadataOptions GetNfoConfiguration(this IConfigurationManager configurationManager)
|
||||
=> configurationManager.GetConfiguration<XbmcMetadataOptions>("xbmcmetadata");
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
|
||||
namespace Jellyfin.LiveTv.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IConfigurationFactory" /> implementation for <see cref="LiveTvOptions" />.
|
||||
/// </summary>
|
||||
public class LiveTvConfigurationFactory : IConfigurationFactory
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ConfigurationStore> GetConfigurations()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new ConfigurationStore
|
||||
{
|
||||
ConfigurationType = typeof(LiveTvOptions),
|
||||
Key = "livetv"
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user