diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-10-01 20:14:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-01 20:14:10 -0400 |
| commit | 796f374359d75e22d2095b3f3a8f9b220cacde27 (patch) | |
| tree | 253f4c152432f2ca2f9fb074b05650359a7ec23c | |
| parent | 71ee865689a1fe8ffbc8cf6067b99f4ed9b12fbe (diff) | |
| parent | 1da8509ae5b09cb421ece67421f2a88544a2c940 (diff) | |
Merge pull request #2930 from MediaBrowser/dev
Dev
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs | 1 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Session/SessionManager.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/BasePluginFolder.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/CollectionFolder.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserView.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Video.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs | 11 | ||||
| -rw-r--r-- | SharedVersion.cs | 2 |
9 files changed, 52 insertions, 26 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 5ef910e51..9f08c6462 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -1642,6 +1642,7 @@ namespace Emby.Server.Implementations.Dto return null; } + return null; _logger.Info("Getting image size for item type {0}", item.GetType().Name); try diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 6f185bc81..97506cdef 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1406,11 +1406,19 @@ namespace Emby.Server.Implementations.Session .FirstOrDefault(i => string.Equals(request.Username, i.Name, StringComparison.OrdinalIgnoreCase)); } - if (user != null && !string.IsNullOrWhiteSpace(request.DeviceId)) + if (user != null) { - if (!_deviceManager.CanAccessDevice(user.Id.ToString("N"), request.DeviceId)) + if (!user.IsParentalScheduleAllowed()) + { + throw new SecurityException("User is not allowed access at this time."); + } + + if (!string.IsNullOrWhiteSpace(request.DeviceId)) { - throw new SecurityException("User is not allowed access from this device."); + if (!_deviceManager.CanAccessDevice(user.Id.ToString("N"), request.DeviceId)) + { + throw new SecurityException("User is not allowed access from this device."); + } } } diff --git a/MediaBrowser.Controller/Entities/BasePluginFolder.cs b/MediaBrowser.Controller/Entities/BasePluginFolder.cs index d2459f208..c06f1cef4 100644 --- a/MediaBrowser.Controller/Entities/BasePluginFolder.cs +++ b/MediaBrowser.Controller/Entities/BasePluginFolder.cs @@ -43,12 +43,12 @@ namespace MediaBrowser.Controller.Entities } } - public override double? GetDefaultPrimaryImageAspectRatio() - { - double value = 16; - value /= 9; + //public override double? GetDefaultPrimaryImageAspectRatio() + //{ + // double value = 16; + // value /= 9; - return value; - } + // return value; + //} } } diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index 16630efe4..5fb9e517c 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -31,13 +31,13 @@ namespace MediaBrowser.Controller.Entities PhysicalFolderIds = EmptyGuidArray; } - public override double? GetDefaultPrimaryImageAspectRatio() - { - double value = 16; - value /= 9; + //public override double? GetDefaultPrimaryImageAspectRatio() + //{ + // double value = 16; + // value /= 9; - return value; - } + // return value; + //} [IgnoreDataMember] public override bool SupportsPlayedStatus diff --git a/MediaBrowser.Controller/Entities/UserView.cs b/MediaBrowser.Controller/Entities/UserView.cs index 57eeafe91..2152e65cf 100644 --- a/MediaBrowser.Controller/Entities/UserView.cs +++ b/MediaBrowser.Controller/Entities/UserView.cs @@ -58,13 +58,13 @@ namespace MediaBrowser.Controller.Entities } } - public override double? GetDefaultPrimaryImageAspectRatio() - { - double value = 16; - value /= 9; + //public override double? GetDefaultPrimaryImageAspectRatio() + //{ + // double value = 16; + // value /= 9; - return value; - } + // return value; + //} public override int GetChildCount(User user) { diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index ffb601dc4..8693d867c 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -78,6 +78,14 @@ namespace MediaBrowser.Controller.Entities } } + public override double? GetDefaultPrimaryImageAspectRatio() + { + double value = 16; + value /= 9; + + return value; + } + public override string CreatePresentationUniqueKey() { if (!string.IsNullOrWhiteSpace(PrimaryVersionId)) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 6be68043f..8b612f809 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -530,7 +530,8 @@ namespace MediaBrowser.Controller.MediaEncoding { var seconds = Math.Round(TimeSpan.FromTicks(state.StartTimeTicks ?? 0).TotalSeconds); - var setPtsParam = state.CopyTimestamps + // hls always copies timestamps + var setPtsParam = state.CopyTimestamps || state.TranscodingType != TranscodingJobType.Progressive ? string.Empty : string.Format(",setpts=PTS -{0}/TB", seconds.ToString(_usCulture)); @@ -1083,7 +1084,8 @@ namespace MediaBrowser.Controller.MediaEncoding } } - if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode && !state.CopyTimestamps) + var isCopyingTimestamps = state.CopyTimestamps || state.TranscodingType != TranscodingJobType.Progressive; + if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode && !isCopyingTimestamps) { var seconds = TimeSpan.FromTicks(state.StartTimeTicks ?? 0).TotalSeconds; diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs index cf067ddf4..506fce3ca 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs @@ -163,6 +163,14 @@ namespace MediaBrowser.Controller.MediaEncoding public bool DeInterlace(string videoCodec, bool forceDeinterlaceIfSourceIsInterlaced) { + var videoStream = VideoStream; + var isInputInterlaced = videoStream != null && videoStream.IsInterlaced; + + if (!isInputInterlaced) + { + return false; + } + // Support general param if (BaseRequest.DeInterlace) { @@ -179,8 +187,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (forceDeinterlaceIfSourceIsInterlaced) { - var videoStream = VideoStream; - if (videoStream != null && videoStream.IsInterlaced) + if (isInputInterlaced) { return true; } diff --git a/SharedVersion.cs b/SharedVersion.cs index a3ccb0b7a..5be0a1656 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.32.15")] +[assembly: AssemblyVersion("3.2.32.16")] |
