public override bool HandleRequest(IOwinContext context, DlnaMediaItem item)
        {
            bool bHandled = false;

            if (!string.IsNullOrEmpty(context.Request.Headers["getCaptionInfo.sec"]))
            {
                if (context.Request.Headers["getCaptionInfo.sec"] == "1")
                {
                    if (context.Request.Uri.ToString().ToUpperInvariant().Contains("LOCALHOST"))
                    {
                        bHandled = true;
                    }
                    string mime = "";
                    string type = "";
                    context.Response.Headers["CaptionInfo.sec"] = DlnaResourceAccessUtils.GetSubtitleBaseURL(item.MediaItemId, item.Client, out mime, out type);
                }
            }

            if (!string.IsNullOrEmpty(context.Request.Headers["getMediaInfo.sec"]))
            {
                if (context.Request.Headers["getMediaInfo.sec"] == "1")
                {
                    //TODO: How to handle multiple video streams?
                    if (item.Metadata.Duration.HasValue)
                    {
                        context.Response.Headers["MediaInfo.sec"] = $"SEC_Duration={Convert.ToInt32(item.Metadata.Duration.Value * 1000.0)};";
                    }
                }
            }
            return(bHandled);
        }
        public void Initialise()
        {
            DlnaMediaItem dlnaItem = Client.GetDlnaItem(MediaItemId);

            if (DlnaResourceAccessUtils.IsSoftCodedSubtitleAvailable(dlnaItem, Client) == true)
            {
                string mime = null;
                string type = null;
                Uri          = DlnaResourceAccessUtils.GetSubtitleBaseURL(MediaItemId, Client, out mime, out type);
                MimeType     = mime;
                SubtitleType = type;
            }
        }