From f06d52c4756fa2b61744fb11d7cf105b349a1885 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Fri, 18 Dec 2020 23:29:21 +0000 Subject: Disable API if dlna is disabled. --- Emby.Dlna/Main/DlnaEntryPoint.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Emby.Dlna/Main') diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs index fb4454a343..175a1ad2b1 100644 --- a/Emby.Dlna/Main/DlnaEntryPoint.cs +++ b/Emby.Dlna/Main/DlnaEntryPoint.cs @@ -126,6 +126,11 @@ namespace Emby.Dlna.Main public static DlnaEntryPoint Current { get; private set; } + /// + /// Gets a value indicating whether the dlna server is enabled. + /// + public static bool Enabled { get; private set; } + public IContentDirectory ContentDirectory { get; private set; } public IConnectionManager ConnectionManager { get; private set; } @@ -152,6 +157,7 @@ namespace Emby.Dlna.Main private void ReloadComponents() { var options = _config.GetDlnaConfiguration(); + Enabled = options.EnableServer; StartSsdpHandler(); -- cgit v1.2.3