diff --git a/src/Jellyfin.Plugin.Dlna/Api/DlnaServerController.cs b/src/Jellyfin.Plugin.Dlna/Api/DlnaServerController.cs index e814d37..99630c3 100644 --- a/src/Jellyfin.Plugin.Dlna/Api/DlnaServerController.cs +++ b/src/Jellyfin.Plugin.Dlna/Api/DlnaServerController.cs @@ -66,7 +66,12 @@ public ActionResult GetDescriptionXml([FromRoute, Required] string serve string? userAgent = Request.Headers.UserAgent; if (userAgent is not null) { - userAgent = userAgent.Substring(0, userAgent.IndexOf('/')); + var firstIndexOfSlash = userAgent.IndexOf('/'); + if (firstIndexOfSlash > 0) + { + userAgent = userAgent.Substring(0, firstIndexOfSlash); + } + useRelativePath = _relativePathUserAgents.Contains(userAgent, StringComparison.Ordinal); }