Skip to content

Commit

Permalink
remove copyts from hls
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Apr 3, 2015
1 parent e6ee758 commit e87b8f2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
4 changes: 2 additions & 2 deletions MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
Expand Up @@ -698,7 +698,7 @@ protected override string GetCommandLineArguments(string outputPath, StreamState
{
var outputTsArg = Path.Combine(Path.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d.ts";

return string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -copyts -flags -global_header -sc_threshold 0 {5} -f segment -segment_time {6} -segment_start_number {7} -segment_list \"{8}\" -y \"{9}\"",
return string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -flags -global_header -sc_threshold 0 {5} -f segment -segment_time {6} -segment_start_number {7} -segment_list \"{8}\" -y \"{9}\"",
inputModifier,
GetInputArgument(state),
threads,
Expand All @@ -712,7 +712,7 @@ protected override string GetCommandLineArguments(string outputPath, StreamState
).Trim();
}

return string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -copyts -flags -global_header -sc_threshold 0 {5} -hls_time {6} -start_number {7} -hls_list_size {8} -y \"{9}\"",
return string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -flags -global_header -sc_threshold 0 {5} -hls_time {6} -start_number {7} -hls_list_size {8} -y \"{9}\"",
inputModifier,
GetInputArgument(state),
threads,
Expand Down
1 change: 1 addition & 0 deletions MediaBrowser.Model/Configuration/UserConfiguration.cs
Expand Up @@ -61,6 +61,7 @@ public class UserConfiguration
/// </summary>
public UserConfiguration()
{
HidePlayedInLatest = true;
PlayDefaultAudioTrack = true;

LatestItemsExcludes = new string[] { };
Expand Down
Expand Up @@ -169,29 +169,32 @@ public static string GetUserDistinctValue(User user)

foreach (var item in result.Items)
{
var channelItem = (IChannelMediaItem)item;
var channelItem = item as IChannelMediaItem;

var channelFeatures = _manager.GetChannelFeatures(channelItem.ChannelId);

if (channelFeatures.SupportsContentDownloading)
if (channelItem != null)
{
if (options.DownloadingChannels.Contains(channelItem.ChannelId))
var channelFeatures = _manager.GetChannelFeatures(channelItem.ChannelId);

if (channelFeatures.SupportsContentDownloading)
{
try
{
await DownloadChannelItem(channelItem, options, cancellationToken, path);
}
catch (OperationCanceledException)
{
break;
}
catch (ChannelDownloadException)
{
// Logged at lower levels
}
catch (Exception ex)
if (options.DownloadingChannels.Contains(channelItem.ChannelId))
{
_logger.ErrorException("Error downloading channel content for {0}", ex, item.Name);
try
{
await DownloadChannelItem(channelItem, options, cancellationToken, path);
}
catch (OperationCanceledException)
{
break;
}
catch (ChannelDownloadException)
{
// Logged at lower levels
}
catch (Exception ex)
{
_logger.ErrorException("Error downloading channel content for {0}", ex, item.Name);
}
}
}
}
Expand Down

0 comments on commit e87b8f2

Please sign in to comment.