diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-21 03:25:49 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-05-21 03:25:49 -0400 |
| commit | da77b058172e1c7cdeb6dadd6106ea3fdd739544 (patch) | |
| tree | 570215d192714f18170558e6664bcab539a7b07c /Emby.Server.Implementations/LiveTv/EmbyTV | |
| parent | ead88d3b65c8bd1023d6915af0aed1c703e21979 (diff) | |
update data queries
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/EmbyTV')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs | 18 | ||||
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs | 17 |
2 files changed, 23 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 7f1a9ba6d1..89b772731c 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -30,6 +30,7 @@ using MediaBrowser.Common.Events; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.IO; using MediaBrowser.Controller; +using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.IO; @@ -1232,7 +1233,9 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV RequiresClosing = false, Protocol = MediaBrowser.Model.MediaInfo.MediaProtocol.Http, BufferMs = 0, - IgnoreDts = true + IgnoreDts = true, + IgnoreIndex = true, + GenPtsInput = true }; var isAudio = false; @@ -1640,7 +1643,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV SortOrder = SortOrder.Descending, IsVirtualItem = false, IsFolder = false, - Recursive = true + Recursive = true, + DtoOptions = new DtoOptions(true) }).ConfigureAwait(false)) .Items @@ -1977,7 +1981,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { IncludeItemTypes = new[] { typeof(LiveTvProgram).Name }, Limit = 1, - ExternalId = timer.ProgramId + ExternalId = timer.ProgramId, + DtoOptions = new DtoOptions(true) }).FirstOrDefault() as LiveTvProgram; @@ -2511,16 +2516,17 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV if (program.EpisodeNumber.HasValue && program.SeasonNumber.HasValue) { - var result = _libraryManager.GetItemsResult(new InternalItemsQuery + var result = _libraryManager.GetItemIds(new InternalItemsQuery { IncludeItemTypes = new[] { typeof(Episode).Name }, ParentIndexNumber = program.SeasonNumber.Value, IndexNumber = program.EpisodeNumber.Value, AncestorIds = seriesIds, - IsVirtualItem = false + IsVirtualItem = false, + Limit = 1 }); - if (result.TotalRecordCount > 0) + if (result.Count > 0) { return true; } diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 2f449bee2b..cec1586339 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -200,27 +200,32 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV flags.Add("+genpts"); } - var inputModifiers = "-async 1 -vsync -1"; + var inputModifier = "-async 1 -vsync -1"; if (flags.Count > 0) { - inputModifiers += " -fflags " + string.Join("", flags.ToArray()); + inputModifier += " -fflags " + string.Join("", flags.ToArray()); } if (!string.IsNullOrWhiteSpace(GetEncodingOptions().HardwareAccelerationType)) { - inputModifiers += " -hwaccel auto"; + inputModifier += " -hwaccel auto"; } if (mediaSource.ReadAtNativeFramerate) { - inputModifiers += " -re"; + inputModifier += " -re"; + } + + if (mediaSource.RequiresLooping) + { + inputModifier += " -stream_loop -1"; } var analyzeDurationSeconds = 5; var analyzeDuration = " -analyzeduration " + (analyzeDurationSeconds * 1000000).ToString(CultureInfo.InvariantCulture); - inputModifiers += analyzeDuration; + inputModifier += analyzeDuration; var subtitleArgs = CopySubtitles ? " -codec:s copy" : " -sn"; @@ -239,7 +244,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV durationParam, outputParam); - return inputModifiers + " " + commandLineArgs; + return inputModifier + " " + commandLineArgs; } private string GetAudioArgs(MediaSourceInfo mediaSource) |
