diff options
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Configuration/LibraryOptions.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 18 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MediaSourceInfo.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/MediaStream.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Model/Library/UserViewQuery.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs | 35 | ||||
| -rw-r--r-- | MediaBrowser.Model/Plugins/PluginPageInfo.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/LatestItemsQuery.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/NextUpQuery.cs | 26 |
9 files changed, 71 insertions, 36 deletions
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index c956bee47..b0f5c2a11 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -13,6 +13,8 @@ namespace MediaBrowser.Model.Configuration DisabledSubtitleFetchers = Array.Empty<string>(); SubtitleFetcherOrder = Array.Empty<string>(); DisabledLocalMetadataReaders = Array.Empty<string>(); + DisabledLyricFetchers = Array.Empty<string>(); + LyricFetcherOrder = Array.Empty<string>(); SkipSubtitlesIfAudioTrackMatches = true; RequirePerfectSubtitleMatch = true; @@ -97,6 +99,10 @@ namespace MediaBrowser.Model.Configuration [DefaultValue(false)] public bool SaveLyricsWithMedia { get; set; } + public string[] DisabledLyricFetchers { get; set; } + + public string[] LyricFetcherOrder { get; set; } + public bool AutomaticallyAddToCollection { get; set; } public EmbeddedSubtitleOptions AllowEmbeddedSubtitles { get; set; } diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index d2715e2ac..1101c76ea 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -965,8 +965,10 @@ namespace MediaBrowser.Model.Dlna var appliedVideoConditions = options.Profile.CodecProfiles .Where(i => i.Type == CodecType.Video && i.ContainsAnyCodec(videoStream?.Codec, container) && - i.ApplyConditions.All(applyCondition => ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoRangeType, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))); - var isFirstAppliedCodecProfile = true; + i.ApplyConditions.All(applyCondition => ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoRangeType, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))) + // Reverse codec profiles for backward compatibility - first codec profile has higher priority + .Reverse(); + foreach (var i in appliedVideoConditions) { var transcodingVideoCodecs = ContainerProfile.SplitValue(videoCodec); @@ -974,8 +976,7 @@ namespace MediaBrowser.Model.Dlna { if (i.ContainsAnyCodec(transcodingVideoCodec, container)) { - ApplyTranscodingConditions(playlistItem, i.Conditions, transcodingVideoCodec, true, isFirstAppliedCodecProfile); - isFirstAppliedCodecProfile = false; + ApplyTranscodingConditions(playlistItem, i.Conditions, transcodingVideoCodec, true, true); continue; } } @@ -997,8 +998,10 @@ namespace MediaBrowser.Model.Dlna var appliedAudioConditions = options.Profile.CodecProfiles .Where(i => i.Type == CodecType.VideoAudio && i.ContainsAnyCodec(audioStream?.Codec, container) && - i.ApplyConditions.All(applyCondition => ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth, audioProfile, isSecondaryAudio))); - isFirstAppliedCodecProfile = true; + i.ApplyConditions.All(applyCondition => ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth, audioProfile, isSecondaryAudio))) + // Reverse codec profiles for backward compatibility - first codec profile has higher priority + .Reverse(); + foreach (var codecProfile in appliedAudioConditions) { var transcodingAudioCodecs = ContainerProfile.SplitValue(audioCodec); @@ -1006,8 +1009,7 @@ namespace MediaBrowser.Model.Dlna { if (codecProfile.ContainsAnyCodec(transcodingAudioCodec, container)) { - ApplyTranscodingConditions(playlistItem, codecProfile.Conditions, transcodingAudioCodec, true, isFirstAppliedCodecProfile); - isFirstAppliedCodecProfile = false; + ApplyTranscodingConditions(playlistItem, codecProfile.Conditions, transcodingAudioCodec, true, true); break; } } diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index b7236b1e8..1c6037325 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -117,6 +117,8 @@ namespace MediaBrowser.Model.Dto public int? DefaultSubtitleStreamIndex { get; set; } + public bool HasSegments { get; set; } + [JsonIgnore] public MediaStream VideoStream { diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 20e011745..a0e8c39be 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -124,6 +124,12 @@ namespace MediaBrowser.Model.Entities public int? DvBlSignalCompatibilityId { get; set; } /// <summary> + /// Gets or sets the Rotation in degrees. + /// </summary> + /// <value>The video rotation.</value> + public int? Rotation { get; set; } + + /// <summary> /// Gets or sets the comment. /// </summary> /// <value>The comment.</value> diff --git a/MediaBrowser.Model/Library/UserViewQuery.cs b/MediaBrowser.Model/Library/UserViewQuery.cs index e20d6af49..643a1f9b1 100644 --- a/MediaBrowser.Model/Library/UserViewQuery.cs +++ b/MediaBrowser.Model/Library/UserViewQuery.cs @@ -1,6 +1,7 @@ #pragma warning disable CS1591 using System; +using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; namespace MediaBrowser.Model.Library @@ -14,10 +15,10 @@ namespace MediaBrowser.Model.Library } /// <summary> - /// Gets or sets the user identifier. + /// Gets or sets the user. /// </summary> - /// <value>The user identifier.</value> - public Guid UserId { get; set; } + /// <value>The user.</value> + public required User User { get; set; } /// <summary> /// Gets or sets a value indicating whether [include external content]. diff --git a/MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs b/MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs new file mode 100644 index 000000000..a0433fee1 --- /dev/null +++ b/MediaBrowser.Model/MediaSegments/MediaSegmentDto.cs @@ -0,0 +1,35 @@ +using System; +using Jellyfin.Data.Enums; + +namespace MediaBrowser.Model.MediaSegments; + +/// <summary> +/// Api model for MediaSegment's. +/// </summary> +public class MediaSegmentDto +{ + /// <summary> + /// Gets or sets the id of the media segment. + /// </summary> + public Guid Id { get; set; } + + /// <summary> + /// Gets or sets the id of the associated item. + /// </summary> + public Guid ItemId { get; set; } + + /// <summary> + /// Gets or sets the type of content this segment defines. + /// </summary> + public MediaSegmentType Type { get; set; } + + /// <summary> + /// Gets or sets the start of the segment. + /// </summary> + public long StartTicks { get; set; } + + /// <summary> + /// Gets or sets the end of the segment. + /// </summary> + public long EndTicks { get; set; } +} diff --git a/MediaBrowser.Model/Plugins/PluginPageInfo.cs b/MediaBrowser.Model/Plugins/PluginPageInfo.cs index f4d83c28b..2ab93ea05 100644 --- a/MediaBrowser.Model/Plugins/PluginPageInfo.cs +++ b/MediaBrowser.Model/Plugins/PluginPageInfo.cs @@ -6,12 +6,12 @@ namespace MediaBrowser.Model.Plugins public class PluginPageInfo { /// <summary> - /// Gets or sets the name. + /// Gets or sets the name of the plugin. /// </summary> public string Name { get; set; } = string.Empty; /// <summary> - /// Gets or sets the display name. + /// Gets or sets the display name of the plugin. /// </summary> public string? DisplayName { get; set; } diff --git a/MediaBrowser.Model/Querying/LatestItemsQuery.cs b/MediaBrowser.Model/Querying/LatestItemsQuery.cs index d2d9f1f9a..251ff5d68 100644 --- a/MediaBrowser.Model/Querying/LatestItemsQuery.cs +++ b/MediaBrowser.Model/Querying/LatestItemsQuery.cs @@ -2,6 +2,7 @@ #pragma warning disable CS1591 using System; +using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; using MediaBrowser.Model.Entities; @@ -18,7 +19,7 @@ namespace MediaBrowser.Model.Querying /// Gets or sets the user to localize search results for. /// </summary> /// <value>The user id.</value> - public Guid UserId { get; set; } + public User User { get; set; } /// <summary> /// Gets or sets the parent id. diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index 35353e6fa..8dece28a0 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -1,7 +1,7 @@ -#nullable disable #pragma warning disable CS1591 using System; +using Jellyfin.Data.Entities; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying @@ -19,10 +19,10 @@ namespace MediaBrowser.Model.Querying } /// <summary> - /// Gets or sets the user id. + /// Gets or sets the user. /// </summary> - /// <value>The user id.</value> - public Guid UserId { get; set; } + /// <value>The user.</value> + public required User User { get; set; } /// <summary> /// Gets or sets the parent identifier. @@ -49,24 +49,6 @@ namespace MediaBrowser.Model.Querying public int? Limit { get; set; } /// <summary> - /// gets or sets the fields to return within the items, in addition to basic information. - /// </summary> - /// <value>The fields.</value> - public ItemFields[] Fields { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether [enable images]. - /// </summary> - /// <value><c>null</c> if [enable images] contains no value, <c>true</c> if [enable images]; otherwise, <c>false</c>.</value> - public bool? EnableImages { get; set; } - - /// <summary> - /// Gets or sets the image type limit. - /// </summary> - /// <value>The image type limit.</value> - public int? ImageTypeLimit { get; set; } - - /// <summary> /// Gets or sets the enable image types. /// </summary> /// <value>The enable image types.</value> |
