fix samsung dlna subtitles
This commit is contained in:
parent
7a014affb2
commit
49c678037a
|
@ -188,15 +188,15 @@ namespace MediaBrowser.Dlna.Didl
|
||||||
{
|
{
|
||||||
var subtitleAdded = AddSubtitleElement(container, subtitle);
|
var subtitleAdded = AddSubtitleElement(container, subtitle);
|
||||||
|
|
||||||
if (subtitleAdded && _profile.EnableSingleSubtitleLimit)
|
if (subtitleAdded && _profile.EnableSingleSubtitleLimit)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool AddSubtitleElement(XmlElement container, SubtitleStreamInfo info)
|
private bool AddSubtitleElement(XmlElement container, SubtitleStreamInfo info)
|
||||||
{
|
{
|
||||||
var subtitleProfile = _profile.SubtitleProfiles
|
var subtitleProfile = _profile.SubtitleProfiles
|
||||||
.FirstOrDefault(i => string.Equals(info.Format, i.Format, StringComparison.OrdinalIgnoreCase) && i.Method == SubtitleDeliveryMethod.External);
|
.FirstOrDefault(i => string.Equals(info.Format, i.Format, StringComparison.OrdinalIgnoreCase) && i.Method == SubtitleDeliveryMethod.External);
|
||||||
|
@ -213,13 +213,13 @@ namespace MediaBrowser.Dlna.Didl
|
||||||
// <sec:CaptionInfoEx sec:type="srt">http://192.168.1.3:9999/video.srt</sec:CaptionInfoEx>
|
// <sec:CaptionInfoEx sec:type="srt">http://192.168.1.3:9999/video.srt</sec:CaptionInfoEx>
|
||||||
// <sec:CaptionInfo sec:type="srt">http://192.168.1.3:9999/video.srt</sec:CaptionInfo>
|
// <sec:CaptionInfo sec:type="srt">http://192.168.1.3:9999/video.srt</sec:CaptionInfo>
|
||||||
|
|
||||||
//var res = container.OwnerDocument.CreateElement("SEC", "CaptionInfoEx");
|
var res = container.OwnerDocument.CreateElement("CaptionInfoEx", "sec");
|
||||||
|
|
||||||
//res.InnerText = info.Url;
|
res.InnerText = info.Url;
|
||||||
|
|
||||||
//// TODO: attribute needs SEC:
|
//// TODO: attribute needs SEC:
|
||||||
//res.SetAttribute("type", info.Format.ToLower());
|
res.SetAttribute("type", "sec", info.Format.ToLower());
|
||||||
//container.AppendChild(res);
|
container.AppendChild(res);
|
||||||
}
|
}
|
||||||
else if (string.Equals(subtitleMode, "smi", StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(subtitleMode, "smi", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ namespace MediaBrowser.Dlna.Didl
|
||||||
container.AppendChild(res);
|
container.AppendChild(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddVideoResource(XmlElement container, IHasMediaSources video, string deviceId, Filter filter, string contentFeatures, StreamInfo streamInfo)
|
private void AddVideoResource(XmlElement container, IHasMediaSources video, string deviceId, Filter filter, string contentFeatures, StreamInfo streamInfo)
|
||||||
|
|
|
@ -604,7 +604,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||||
|
|
||||||
process.StandardError.BaseStream.CopyToAsync(logFileStream);
|
process.StandardError.BaseStream.CopyToAsync(logFileStream);
|
||||||
|
|
||||||
var ranToCompletion = process.WaitForExit(120000);
|
var ranToCompletion = process.WaitForExit(300000);
|
||||||
|
|
||||||
if (!ranToCompletion)
|
if (!ranToCompletion)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user