disable split by time

This commit is contained in:
Luke Pulverenti 2016-10-17 12:18:12 -04:00
parent eb65dd8126
commit ba613d5671
2 changed files with 15 additions and 18 deletions

View File

@ -885,8 +885,13 @@ namespace MediaBrowser.Api.Playback.Hls
}
var mapArgs = state.IsOutputVideo ? GetMapArgs(state) : string.Empty;
var enableSplittingOnNonKeyFrames = state.VideoRequest.EnableSplittingOnNonKeyFrames && string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase);
enableSplittingOnNonKeyFrames = false;
if (state.VideoRequest.EnableSplittingOnNonKeyFrames)
// TODO: check libavformat version for 57 50.100 and use -hls_flags split_by_time
var hlsProtocolSupportsSplittingByTime = false;
if (enableSplittingOnNonKeyFrames && !hlsProtocolSupportsSplittingByTime)
{
var outputTsArg = Path.Combine(Path.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d" + GetSegmentFileExtension(state);
@ -905,9 +910,7 @@ namespace MediaBrowser.Api.Playback.Hls
).Trim();
}
// TODO: check libavformat version for 57 50.100 and use -hls_flags split_by_time
var supportsSplitByTime = false;
var splitByTime = supportsSplitByTime && state.VideoRequest.EnableSplittingOnNonKeyFrames;
var splitByTime = hlsProtocolSupportsSplittingByTime && enableSplittingOnNonKeyFrames;
var splitByTimeArg = splitByTime ? " -hls_flags split_by_time" : "";
return string.Format("{0}{12} {1} -map_metadata -1 -threads {2} {3} {4}{5} {6} -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -hls_time {7}{8} -start_number {9} -hls_list_size {10} -y \"{11}\"",

View File

@ -449,10 +449,9 @@ namespace MediaBrowser.XbmcMetadata.Savers
writer.WriteElementString("plot", overview);
}
var hasShortOverview = item as IHasShortOverview;
if (hasShortOverview != null)
if (item is Video)
{
var outline = (hasShortOverview.ShortOverview ?? string.Empty)
var outline = (item.ShortOverview ?? string.Empty)
.StripHtml()
.Replace(""", "'");
@ -658,19 +657,14 @@ namespace MediaBrowser.XbmcMetadata.Savers
}
}
var hasCriticRating = item as IHasCriticRating;
if (hasCriticRating != null)
if (item.CriticRating.HasValue)
{
if (hasCriticRating.CriticRating.HasValue)
{
writer.WriteElementString("criticrating", hasCriticRating.CriticRating.Value.ToString(UsCulture));
}
writer.WriteElementString("criticrating", item.CriticRating.Value.ToString(UsCulture));
}
if (!string.IsNullOrEmpty(hasCriticRating.CriticRatingSummary))
{
writer.WriteElementString("criticratingsummary", hasCriticRating.CriticRatingSummary);
}
if (!string.IsNullOrEmpty(item.CriticRatingSummary))
{
writer.WriteElementString("criticratingsummary", item.CriticRatingSummary);
}
var hasDisplayOrder = item as IHasDisplayOrder;