From 316b1c9b7bed715a3a6c4453748f6f6b1f2a6203 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 28 May 2017 11:56:12 -0400 Subject: [PATCH 1/3] update play queue --- MediaBrowser.Server.Mono/Program.cs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.cs index a9aed0fce1..af6e00e257 100644 --- a/MediaBrowser.Server.Mono/Program.cs +++ b/MediaBrowser.Server.Mono/Program.cs @@ -42,7 +42,6 @@ namespace MediaBrowser.Server.Mono var applicationPath = Assembly.GetEntryAssembly().Location; var appFolderPath = Path.GetDirectoryName(applicationPath); - TryCopySqliteConfigFile(appFolderPath); SetSqliteProvider(); var options = new StartupOptions(Environment.GetCommandLineArgs()); @@ -74,20 +73,6 @@ namespace MediaBrowser.Server.Mono } } - private static void TryCopySqliteConfigFile(string appFolderPath) - { - try - { - File.Copy(Path.Combine(appFolderPath, "System.Data.SQLite.dll.config"), - Path.Combine(appFolderPath, "SQLitePCLRaw.provider.sqlite3.dll.config"), - true); - } - catch - { - - } - } - private static void SetSqliteProvider() { SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3()); @@ -260,7 +245,8 @@ namespace MediaBrowser.Server.Mono { var message = LogHelper.GetLogMessage(exception).ToString(); - if (message.IndexOf("InotifyWatcher", StringComparison.OrdinalIgnoreCase) == -1) + if (message.IndexOf("InotifyWatcher", StringComparison.OrdinalIgnoreCase) == -1 && + message.IndexOf("_IOCompletionCallback", StringComparison.OrdinalIgnoreCase) == -1) { Environment.Exit(System.Runtime.InteropServices.Marshal.GetHRForException(exception)); } From 3e15b28b1816b656ba4b5d5fc8b640f457b8df64 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 May 2017 08:35:59 -0400 Subject: [PATCH 2/3] add IsInterlaced param --- Emby.Dlna/Didl/DidlBuilder.cs | 2 + Emby.Dlna/PlayTo/PlayToController.cs | 1 + .../LiveTv/EmbyTV/RecordingHelper.cs | 2 +- .../TunerHosts/HdHomerun/HdHomerunHost.cs | 2 +- .../Playback/BaseStreamingService.cs | 2 + MediaBrowser.Api/Playback/StreamState.cs | 44 +++++++++++++------ .../Encoder/EncodingJob.cs | 18 ++++++++ .../Encoder/EncodingJobFactory.cs | 1 + MediaBrowser.Model/Dlna/ConditionProcessor.cs | 3 ++ .../Dlna/ContentFeatureBuilder.cs | 2 + MediaBrowser.Model/Dlna/DeviceProfile.cs | 3 +- MediaBrowser.Model/Dlna/StreamBuilder.cs | 10 +++-- MediaBrowser.Model/Dlna/StreamInfo.cs | 18 ++++++++ 13 files changed, 88 insertions(+), 20 deletions(-) diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index e22bf45c8a..4d003ca7cb 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -224,6 +224,7 @@ namespace Emby.Dlna.Didl streamInfo.TargetPacketLength, streamInfo.TranscodeSeekInfo, streamInfo.IsTargetAnamorphic, + streamInfo.IsTargetInterlaced, streamInfo.TargetRefFrames, streamInfo.TargetVideoStreamCount, streamInfo.TargetAudioStreamCount, @@ -364,6 +365,7 @@ namespace Emby.Dlna.Didl streamInfo.TargetPacketLength, streamInfo.TargetTimestamp, streamInfo.IsTargetAnamorphic, + streamInfo.IsTargetInterlaced, streamInfo.TargetRefFrames, streamInfo.TargetVideoStreamCount, streamInfo.TargetAudioStreamCount, diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index 3a7e753819..8c168dc231 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -556,6 +556,7 @@ namespace Emby.Dlna.PlayTo streamInfo.TargetPacketLength, streamInfo.TranscodeSeekInfo, streamInfo.IsTargetAnamorphic, + streamInfo.IsTargetInterlaced, streamInfo.TargetRefFrames, streamInfo.TargetVideoStreamCount, streamInfo.TargetAudioStreamCount, diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs index 17de93a3c4..94be4a02ef 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs @@ -105,7 +105,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV } else { - name += " " + info.StartDate.ToString("yyyy-MM-dd") + " " + info.Id; + name += " " + info.StartDate.ToString("yyyy-MM-dd"); } return name; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs index 2afc3744f4..504f9a6ee6 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs @@ -423,7 +423,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun IsInfiniteStream = true, IgnoreDts = true, //IgnoreIndex = true, - //ReadAtNativeFramerate = true + ReadAtNativeFramerate = true }; mediaSource.InferTotalBitrate(); diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 6edeb960a8..3ffa26450f 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -880,6 +880,7 @@ namespace MediaBrowser.Api.Playback state.TargetPacketLength, state.TargetTimestamp, state.IsTargetAnamorphic, + state.IsTargetInterlaced, state.TargetRefFrames, state.TargetVideoStreamCount, state.TargetAudioStreamCount, @@ -989,6 +990,7 @@ namespace MediaBrowser.Api.Playback state.TargetPacketLength, state.TranscodeSeekInfo, state.IsTargetAnamorphic, + state.IsTargetInterlaced, state.TargetRefFrames, state.TargetVideoStreamCount, state.TargetAudioStreamCount, diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs index 021a84da79..1daca9e33c 100644 --- a/MediaBrowser.Api/Playback/StreamState.cs +++ b/MediaBrowser.Api/Playback/StreamState.cs @@ -367,6 +367,37 @@ namespace MediaBrowser.Api.Playback } } + public bool? IsTargetAnamorphic + { + get + { + if (Request.Static) + { + return VideoStream == null ? null : VideoStream.IsAnamorphic; + } + + return false; + } + } + + public bool? IsTargetInterlaced + { + get + { + if (Request.Static) + { + return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced; + } + + if (DeInterlace) + { + return false; + } + + return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced; + } + } + private int? GetMediaStreamCount(MediaStreamType type, int limit) { var count = MediaSource.GetStreamCount(type); @@ -448,19 +479,6 @@ namespace MediaBrowser.Api.Playback } } - public bool? IsTargetAnamorphic - { - get - { - if (Request.Static) - { - return VideoStream == null ? null : VideoStream.IsAnamorphic; - } - - return false; - } - } - public bool? IsTargetAVC { get diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs index 9d518c431a..97623c44b7 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs @@ -325,6 +325,24 @@ namespace MediaBrowser.MediaEncoding.Encoder } } + public bool? IsTargetInterlaced + { + get + { + if (Options.Static) + { + return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced; + } + + if (DeInterlace) + { + return false; + } + + return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced; + } + } + public bool? IsTargetAVC { get diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs index df067f3c86..c74a8ce37a 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs @@ -277,6 +277,7 @@ namespace MediaBrowser.MediaEncoding.Encoder state.TargetPacketLength, state.TargetTimestamp, state.IsTargetAnamorphic, + state.IsTargetInterlaced, state.TargetRefFrames, state.TargetVideoStreamCount, state.TargetAudioStreamCount, diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index 63e962c4e3..a388bf98b2 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -20,6 +20,7 @@ namespace MediaBrowser.Model.Dlna int? packetLength, TransportStreamTimestamp? timestamp, bool? isAnamorphic, + bool? isInterlaced, int? refFrames, int? numVideoStreams, int? numAudioStreams, @@ -28,6 +29,8 @@ namespace MediaBrowser.Model.Dlna { switch (condition.Property) { + case ProfileConditionValue.IsInterlaced: + return IsConditionSatisfied(condition, isInterlaced); case ProfileConditionValue.IsAnamorphic: return IsConditionSatisfied(condition, isAnamorphic); case ProfileConditionValue.IsAvc: diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index cd1a29d6b6..6f6994a7e1 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -116,6 +116,7 @@ namespace MediaBrowser.Model.Dlna int? packetLength, TranscodeSeekInfo transcodeSeekInfo, bool? isAnamorphic, + bool? isInterlaced, int? refFrames, int? numVideoStreams, int? numAudioStreams, @@ -158,6 +159,7 @@ namespace MediaBrowser.Model.Dlna packetLength, timestamp, isAnamorphic, + isInterlaced, refFrames, numVideoStreams, numAudioStreams, diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index cd3c9e92b5..33d73e3bb5 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -293,6 +293,7 @@ namespace MediaBrowser.Model.Dlna int? packetLength, TransportStreamTimestamp timestamp, bool? isAnamorphic, + bool? isInterlaced, int? refFrames, int? numVideoStreams, int? numAudioStreams, @@ -331,7 +332,7 @@ namespace MediaBrowser.Model.Dlna var anyOff = false; foreach (ProfileCondition c in i.Conditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) + if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { anyOff = true; break; diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 6ff3ce94c5..1e64c04d2d 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -558,6 +558,7 @@ namespace MediaBrowser.Model.Dlna string videoProfile = videoStream == null ? null : videoStream.Profile; float? videoFramerate = videoStream == null ? null : videoStream.AverageFrameRate ?? videoStream.AverageFrameRate; bool? isAnamorphic = videoStream == null ? null : videoStream.IsAnamorphic; + bool? isInterlaced = videoStream == null ? (bool?)null : videoStream.IsInterlaced; string videoCodecTag = videoStream == null ? null : videoStream.CodecTag; bool? isAvc = videoStream == null ? null : videoStream.IsAVC; @@ -568,7 +569,7 @@ namespace MediaBrowser.Model.Dlna int? numAudioStreams = item.GetStreamCount(MediaStreamType.Audio); int? numVideoStreams = item.GetStreamCount(MediaStreamType.Video); - if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) + if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { LogConditionFailure(options.Profile, "VideoCodecProfile", applyCondition, item); applyConditions = false; @@ -748,6 +749,7 @@ namespace MediaBrowser.Model.Dlna string videoProfile = videoStream == null ? null : videoStream.Profile; float? videoFramerate = videoStream == null ? null : videoStream.AverageFrameRate ?? videoStream.AverageFrameRate; bool? isAnamorphic = videoStream == null ? null : videoStream.IsAnamorphic; + bool? isInterlaced = videoStream == null ? (bool?)null : videoStream.IsInterlaced; string videoCodecTag = videoStream == null ? null : videoStream.CodecTag; bool? isAvc = videoStream == null ? null : videoStream.IsAVC; @@ -766,7 +768,7 @@ namespace MediaBrowser.Model.Dlna // Check container conditions foreach (ProfileCondition i in conditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) + if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { LogConditionFailure(profile, "VideoContainerProfile", i, mediaSource); @@ -793,7 +795,7 @@ namespace MediaBrowser.Model.Dlna bool applyConditions = true; foreach (ProfileCondition applyCondition in i.ApplyConditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) + if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { LogConditionFailure(profile, "VideoCodecProfile", applyCondition, mediaSource); applyConditions = false; @@ -813,7 +815,7 @@ namespace MediaBrowser.Model.Dlna foreach (ProfileCondition i in conditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) + if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { LogConditionFailure(profile, "VideoCodecProfile", i, mediaSource); diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 2c009b37ff..ba5251e8c9 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -746,6 +746,24 @@ namespace MediaBrowser.Model.Dlna } } + public bool? IsTargetInterlaced + { + get + { + if (IsDirectStream) + { + return TargetVideoStream == null ? (bool?)null : TargetVideoStream.IsInterlaced; + } + + if (DeInterlace) + { + return false; + } + + return TargetVideoStream == null ? (bool?)null : TargetVideoStream.IsInterlaced; + } + } + public bool? IsTargetAVC { get From 196b526a53a2dc0e8d81ae6d597518ef9851e901 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 29 May 2017 08:37:31 -0400 Subject: [PATCH 3/3] 3.2.17.18 --- SharedVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharedVersion.cs b/SharedVersion.cs index 46ba93e6b0..a685e9404b 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.17.17")] +[assembly: AssemblyVersion("3.2.17.18")]