From 6405f6c0c74ac689c7817d74aaa58f548d29b84d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 9 Feb 2017 18:25:10 -0500 Subject: update xmltv parsing --- Emby.Server.Implementations/Emby.Server.Implementations.csproj | 4 ++-- Emby.Server.Implementations/packages.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Emby.Server.Implementations') diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 195d24b21..a1bd67f1f 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -309,8 +309,8 @@ {4f26d5d8-a7b0-42b3-ba42-7cb7d245934e} SocketHttpListener.Portable - - ..\packages\Emby.XmlTv.1.0.5\lib\portable-net45+win8\Emby.XmlTv.dll + + ..\packages\Emby.XmlTv.1.0.6\lib\portable-net45+win8\Emby.XmlTv.dll True diff --git a/Emby.Server.Implementations/packages.config b/Emby.Server.Implementations/packages.config index 5249577e6..3c82e979b 100644 --- a/Emby.Server.Implementations/packages.config +++ b/Emby.Server.Implementations/packages.config @@ -1,6 +1,6 @@  - + -- cgit v1.2.3 From 35415d6a504ae8e2f066b2e0e4b1a94745c95bf3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 9 Feb 2017 18:59:27 -0500 Subject: add error handling --- .../LiveTv/EmbyTV/EncodedRecorder.cs | 1 + .../LiveTv/ProgramImageProvider.cs | 15 +++--- .../Encoder/EncodingHelper.cs | 54 +++++++++++----------- 3 files changed, 37 insertions(+), 33 deletions(-) (limited to 'Emby.Server.Implementations') diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 68126f926..9a8282250 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -155,6 +155,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV var durationParam = " -t " + _mediaEncoder.GetTimeParameter(duration.Ticks); var inputModifiers = "-fflags +genpts -async 1 -vsync -1"; var mapArgs = string.Equals(OutputFormat, "mkv", StringComparison.OrdinalIgnoreCase) ? "-map 0" : "-sn"; + mapArgs = "-sn"; var commandLineArgs = "-i \"{0}\"{4} " + mapArgs + " {2} -map_metadata -1 -threads 0 {3} -y \"{1}\""; long startTimeTicks = 0; diff --git a/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs b/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs index 5a0389b16..5cff88a67 100644 --- a/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs +++ b/Emby.Server.Implementations/LiveTv/ProgramImageProvider.cs @@ -50,13 +50,16 @@ namespace Emby.Server.Implementations.LiveTv { var channel = _liveTvManager.GetInternalChannel(liveTvItem.ChannelId); - var response = await service.GetProgramImageAsync(GetItemExternalId(liveTvItem), GetItemExternalId(channel), cancellationToken).ConfigureAwait(false); - - if (response != null) + if (channel != null) { - imageResponse.HasImage = true; - imageResponse.Stream = response.Stream; - imageResponse.Format = response.Format; + var response = await service.GetProgramImageAsync(GetItemExternalId(liveTvItem), GetItemExternalId(channel), cancellationToken).ConfigureAwait(false); + + if (response != null) + { + imageResponse.HasImage = true; + imageResponse.Stream = response.Stream; + imageResponse.Format = response.Format; + } } } catch (NotImplementedException) diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingHelper.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingHelper.cs index ed9552964..83057dba4 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingHelper.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingHelper.cs @@ -1486,33 +1486,33 @@ namespace MediaBrowser.MediaEncoding.Encoder //inputModifier += " -noaccurate_seek"; } - if (!string.IsNullOrWhiteSpace(state.InputContainer)) - { - var inputFormat = GetInputFormat(state.InputContainer); - if (!string.IsNullOrWhiteSpace(inputFormat)) - { - inputModifier += " -f " + inputFormat; - } - } - - if (state.RunTimeTicks.HasValue) - { - foreach (var stream in state.MediaSource.MediaStreams) - { - if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle) - { - if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1) - { - var decoder = GetDecoderFromCodec(stream.Codec); - - if (!string.IsNullOrWhiteSpace(decoder)) - { - inputModifier += " -codec:" + stream.Index.ToString(_usCulture) + " " + decoder; - } - } - } - } - } + //if (!string.IsNullOrWhiteSpace(state.InputContainer)) + //{ + // var inputFormat = GetInputFormat(state.InputContainer); + // if (!string.IsNullOrWhiteSpace(inputFormat)) + // { + // inputModifier += " -f " + inputFormat; + // } + //} + + //if (state.RunTimeTicks.HasValue) + //{ + // foreach (var stream in state.MediaSource.MediaStreams) + // { + // if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle) + // { + // if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1) + // { + // var decoder = GetDecoderFromCodec(stream.Codec); + + // if (!string.IsNullOrWhiteSpace(decoder)) + // { + // inputModifier += " -codec:" + stream.Index.ToString(_usCulture) + " " + decoder; + // } + // } + // } + // } + //} } return inputModifier; -- cgit v1.2.3