Duncan Tourolle c02469c6d0
All checks were successful
Build Plugin / build (push) Successful in 2m15s
Release Plugin / build-and-release (push) Successful in 2m8s
add shared media control allowing jellyfin to control LMS by pointing to files on shared storage
2025-12-16 19:50:15 +01:00

86 lines
2.8 KiB
C#

using MediaBrowser.Model.Plugins;
namespace Jellyfin.Plugin.JellyLMS.Configuration;
/// <summary>
/// Plugin configuration for JellyLMS.
/// </summary>
public class PluginConfiguration : BasePluginConfiguration
{
/// <summary>
/// Initializes a new instance of the <see cref="PluginConfiguration"/> class.
/// </summary>
public PluginConfiguration()
{
LmsServerUrl = "http://localhost:9000";
LmsUsername = string.Empty;
LmsPassword = string.Empty;
JellyfinServerUrl = "http://localhost:8096";
ConnectionTimeoutSeconds = 10;
EnableAutoSync = true;
DefaultPlayerMac = string.Empty;
}
/// <summary>
/// Gets or sets the LMS server URL (e.g., http://192.168.1.100:9000).
/// </summary>
public string LmsServerUrl { get; set; }
/// <summary>
/// Gets or sets the LMS username (if authentication is enabled).
/// </summary>
public string LmsUsername { get; set; }
/// <summary>
/// Gets or sets the LMS password (if authentication is enabled).
/// </summary>
public string LmsPassword { get; set; }
/// <summary>
/// Gets or sets the Jellyfin server URL that LMS will use to stream audio.
/// This should be accessible from the LMS server.
/// </summary>
public string JellyfinServerUrl { get; set; }
/// <summary>
/// Gets or sets the connection timeout in seconds.
/// </summary>
public int ConnectionTimeoutSeconds { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to automatically sync players
/// when playing to multiple devices.
/// </summary>
public bool EnableAutoSync { get; set; }
/// <summary>
/// Gets or sets the default player MAC address to use when none is specified.
/// </summary>
public string DefaultPlayerMac { get; set; }
/// <summary>
/// Gets or sets the Jellyfin API key for authenticating stream requests from LMS.
/// </summary>
public string JellyfinApiKey { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether to use direct file paths instead of HTTP streaming.
/// When enabled, LMS accesses files directly from shared storage, enabling native seeking.
/// </summary>
public bool UseDirectFilePath { get; set; }
/// <summary>
/// Gets or sets the media path prefix as seen by Jellyfin.
/// Used for path mapping when UseDirectFilePath is enabled.
/// Example: /media/music or C:\Music.
/// </summary>
public string JellyfinMediaPath { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the media path prefix as seen by LMS.
/// Used for path mapping when UseDirectFilePath is enabled.
/// Example: /mnt/music or //nas/music.
/// </summary>
public string LmsMediaPath { get; set; } = string.Empty;
}