Duncan Tourolle ac6a3842dd
Some checks failed
🏗️ Build Plugin / call (push) Failing after 0s
📝 Create/Update Release Draft & Release Bump PR / call (push) Failing after 0s
🧪 Test Plugin / call (push) Failing after 0s
🔬 Run CodeQL / call (push) Failing after 0s
first commit
2025-11-12 22:05:36 +01:00

146 lines
4.1 KiB
C#

using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.SRFPlay.Configuration;
/// <summary>
/// Business unit options for SRF content.
/// </summary>
public enum BusinessUnit
{
/// <summary>
/// SRF (Swiss Radio and Television - German).
/// </summary>
SRF,
/// <summary>
/// RTS (Radio Télévision Suisse - French).
/// </summary>
RTS,
/// <summary>
/// RSI (Radiotelevisione svizzera - Italian).
/// </summary>
RSI,
/// <summary>
/// RTR (Radiotelevisiun Svizra Rumantscha - Romansh).
/// </summary>
RTR,
/// <summary>
/// SWI (Swiss World International).
/// </summary>
SWI
}
/// <summary>
/// Quality preference for video streams.
/// </summary>
public enum QualityPreference
{
/// <summary>
/// Automatic quality selection.
/// </summary>
Auto,
/// <summary>
/// Standard definition.
/// </summary>
SD,
/// <summary>
/// High definition.
/// </summary>
HD
}
/// <summary>
/// Plugin configuration.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginConfiguration"/> class.
/// </summary>
public PluginConfiguration()
{
// Set default options
BusinessUnit = BusinessUnit.SRF;
QualityPreference = QualityPreference.Auto;
ContentRefreshIntervalHours = 6;
ExpirationCheckIntervalHours = 24;
CacheDurationMinutes = 60;
EnableLatestContent = true;
EnableTrendingContent = true;
EnableCategoryFolders = true;
EnabledTopics = new System.Collections.Generic.List<string>();
}
/// <summary>
/// Gets or sets the business unit to fetch content from.
/// </summary>
public BusinessUnit BusinessUnit { get; set; }
/// <summary>
/// Gets or sets the preferred video quality.
/// </summary>
public QualityPreference QualityPreference { get; set; }
/// <summary>
/// Gets or sets the content refresh interval in hours.
/// </summary>
public int ContentRefreshIntervalHours { get; set; }
/// <summary>
/// Gets or sets the expiration check interval in hours.
/// </summary>
public int ExpirationCheckIntervalHours { get; set; }
/// <summary>
/// Gets or sets the metadata cache duration in minutes.
/// </summary>
public int CacheDurationMinutes { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable latest content discovery.
/// </summary>
public bool EnableLatestContent { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to enable trending content discovery.
/// </summary>
public bool EnableTrendingContent { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to use a proxy for API requests.
/// </summary>
public bool UseProxy { get; set; }
/// <summary>
/// Gets or sets the proxy server address (e.g., http://proxy.example.com:8080).
/// </summary>
public string ProxyAddress { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the proxy username (optional).
/// </summary>
public string ProxyUsername { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the proxy password (optional).
/// </summary>
public string ProxyPassword { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether to enable category/topic folders in the channel.
/// </summary>
public bool EnableCategoryFolders { get; set; }
/// <summary>
/// Gets or sets the list of enabled topic IDs. If empty, all topics are shown.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Required for configuration serialization")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1002:Do not expose generic lists", Justification = "Configuration DTO")]
public System.Collections.Generic.List<string> EnabledTopics { get; set; }
}