diff options
Diffstat (limited to 'MediaBrowser.Model')
19 files changed, 111 insertions, 677 deletions
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index fbad29143..1c071067d 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -31,6 +31,8 @@ namespace MediaBrowser.Model.Configuration public bool EnableLUFSScan { get; set; } + public bool UseReplayGainTags { get; set; } + public bool EnableChapterImageExtraction { get; set; } public bool ExtractChapterImagesDuringLibraryScan { get; set; } diff --git a/MediaBrowser.Model/Devices/DeviceInfo.cs b/MediaBrowser.Model/Devices/DeviceInfo.cs index 7a1c7a738..4962992a0 100644 --- a/MediaBrowser.Model/Devices/DeviceInfo.cs +++ b/MediaBrowser.Model/Devices/DeviceInfo.cs @@ -15,6 +15,8 @@ namespace MediaBrowser.Model.Devices public string Name { get; set; } + public string CustomName { get; set; } + /// <summary> /// Gets or sets the access token. /// </summary> diff --git a/MediaBrowser.Model/Dlna/DeviceIdentification.cs b/MediaBrowser.Model/Dlna/DeviceIdentification.cs deleted file mode 100644 index 6625b7981..000000000 --- a/MediaBrowser.Model/Dlna/DeviceIdentification.cs +++ /dev/null @@ -1,63 +0,0 @@ -#pragma warning disable CS1591 - -using System; - -namespace MediaBrowser.Model.Dlna -{ - public class DeviceIdentification - { - /// <summary> - /// Gets or sets the name of the friendly. - /// </summary> - /// <value>The name of the friendly.</value> - public string FriendlyName { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the model number. - /// </summary> - /// <value>The model number.</value> - public string ModelNumber { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the serial number. - /// </summary> - /// <value>The serial number.</value> - public string SerialNumber { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the name of the model. - /// </summary> - /// <value>The name of the model.</value> - public string ModelName { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the model description. - /// </summary> - /// <value>The model description.</value> - public string ModelDescription { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the model URL. - /// </summary> - /// <value>The model URL.</value> - public string ModelUrl { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the manufacturer. - /// </summary> - /// <value>The manufacturer.</value> - public string Manufacturer { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the manufacturer URL. - /// </summary> - /// <value>The manufacturer URL.</value> - public string ManufacturerUrl { get; set; } = string.Empty; - - /// <summary> - /// Gets or sets the headers. - /// </summary> - /// <value>The headers.</value> - public HttpHeaderInfo[] Headers { get; set; } = Array.Empty<HttpHeaderInfo>(); - } -} diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 71d0896a7..2addebbfc 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -1,11 +1,7 @@ #pragma warning disable CA1819 // Properties should not return arrays + using System; -using System.ComponentModel; -using System.Linq; using System.Xml.Serialization; -using Jellyfin.Data.Enums; -using Jellyfin.Extensions; -using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { @@ -17,7 +13,6 @@ namespace MediaBrowser.Model.Dlna /// the device is able to direct play (without transcoding or remuxing), /// as well as which <see cref="TranscodingProfiles">containers/codecs to transcode to</see> in case it isn't. /// </summary> - [XmlRoot("Profile")] public class DeviceProfile { /// <summary> @@ -32,104 +27,6 @@ namespace MediaBrowser.Model.Dlna public string? Id { get; set; } /// <summary> - /// Gets or sets the Identification. - /// </summary> - public DeviceIdentification? Identification { get; set; } - - /// <summary> - /// Gets or sets the friendly name of the device profile, which can be shown to users. - /// </summary> - public string? FriendlyName { get; set; } - - /// <summary> - /// Gets or sets the manufacturer of the device which this profile represents. - /// </summary> - public string? Manufacturer { get; set; } - - /// <summary> - /// Gets or sets an url for the manufacturer of the device which this profile represents. - /// </summary> - public string? ManufacturerUrl { get; set; } - - /// <summary> - /// Gets or sets the model name of the device which this profile represents. - /// </summary> - public string? ModelName { get; set; } - - /// <summary> - /// Gets or sets the model description of the device which this profile represents. - /// </summary> - public string? ModelDescription { get; set; } - - /// <summary> - /// Gets or sets the model number of the device which this profile represents. - /// </summary> - public string? ModelNumber { get; set; } - - /// <summary> - /// Gets or sets the ModelUrl. - /// </summary> - public string? ModelUrl { get; set; } - - /// <summary> - /// Gets or sets the serial number of the device which this profile represents. - /// </summary> - public string? SerialNumber { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether EnableAlbumArtInDidl. - /// </summary> - [DefaultValue(false)] - public bool EnableAlbumArtInDidl { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether EnableSingleAlbumArtLimit. - /// </summary> - [DefaultValue(false)] - public bool EnableSingleAlbumArtLimit { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether EnableSingleSubtitleLimit. - /// </summary> - [DefaultValue(false)] - public bool EnableSingleSubtitleLimit { get; set; } - - /// <summary> - /// Gets or sets the SupportedMediaTypes. - /// </summary> - public string SupportedMediaTypes { get; set; } = "Audio,Photo,Video"; - - /// <summary> - /// Gets or sets the UserId. - /// </summary> - public string? UserId { get; set; } - - /// <summary> - /// Gets or sets the AlbumArtPn. - /// </summary> - public string? AlbumArtPn { get; set; } - - /// <summary> - /// Gets or sets the MaxAlbumArtWidth. - /// </summary> - public int? MaxAlbumArtWidth { get; set; } - - /// <summary> - /// Gets or sets the MaxAlbumArtHeight. - /// </summary> - public int? MaxAlbumArtHeight { get; set; } - - /// <summary> - /// Gets or sets the maximum allowed width of embedded icons. - /// </summary> - public int? MaxIconWidth { get; set; } - - /// <summary> - /// Gets or sets the maximum allowed height of embedded icons. - /// </summary> - public int? MaxIconHeight { get; set; } - - /// <summary> /// Gets or sets the maximum allowed bitrate for all streamed content. /// </summary> public int? MaxStreamingBitrate { get; set; } = 8000000; @@ -150,51 +47,6 @@ namespace MediaBrowser.Model.Dlna public int? MaxStaticMusicBitrate { get; set; } = 8000000; /// <summary> - /// Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace. - /// </summary> - public string? SonyAggregationFlags { get; set; } - - /// <summary> - /// Gets or sets the ProtocolInfo. - /// </summary> - public string? ProtocolInfo { get; set; } - - /// <summary> - /// Gets or sets the TimelineOffsetSeconds. - /// </summary> - [DefaultValue(0)] - public int TimelineOffsetSeconds { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether RequiresPlainVideoItems. - /// </summary> - [DefaultValue(false)] - public bool RequiresPlainVideoItems { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether RequiresPlainFolders. - /// </summary> - [DefaultValue(false)] - public bool RequiresPlainFolders { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar. - /// </summary> - [DefaultValue(false)] - public bool EnableMSMediaReceiverRegistrar { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests. - /// </summary> - [DefaultValue(false)] - public bool IgnoreTranscodeByteRangeRequests { get; set; } - - /// <summary> - /// Gets or sets the XmlRootAttributes. - /// </summary> - public XmlAttribute[] XmlRootAttributes { get; set; } = Array.Empty<XmlAttribute>(); - - /// <summary> /// Gets or sets the direct play profiles. /// </summary> public DirectPlayProfile[] DirectPlayProfiles { get; set; } = Array.Empty<DirectPlayProfile>(); @@ -215,297 +67,8 @@ namespace MediaBrowser.Model.Dlna public CodecProfile[] CodecProfiles { get; set; } = Array.Empty<CodecProfile>(); /// <summary> - /// Gets or sets the ResponseProfiles. - /// </summary> - public ResponseProfile[] ResponseProfiles { get; set; } = Array.Empty<ResponseProfile>(); - - /// <summary> /// Gets or sets the subtitle profiles. /// </summary> public SubtitleProfile[] SubtitleProfiles { get; set; } = Array.Empty<SubtitleProfile>(); - - /// <summary> - /// The GetSupportedMediaTypes. - /// </summary> - /// <returns>The .</returns> - public MediaType[] GetSupportedMediaTypes() - { - return ContainerProfile.SplitValue(SupportedMediaTypes) - .Select(m => Enum.TryParse<MediaType>(m, out var parsed) ? parsed : MediaType.Unknown) - .Where(m => m != MediaType.Unknown) - .ToArray(); - } - - /// <summary> - /// Gets the audio transcoding profile. - /// </summary> - /// <param name="container">The container.</param> - /// <param name="audioCodec">The audio Codec.</param> - /// <returns>A <see cref="TranscodingProfile"/>.</returns> - public TranscodingProfile? GetAudioTranscodingProfile(string? container, string? audioCodec) - { - container = (container ?? string.Empty).TrimStart('.'); - - foreach (var i in TranscodingProfiles) - { - if (i.Type != DlnaProfileType.Audio) - { - continue; - } - - if (!string.Equals(container, i.Container, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - if (!i.GetAudioCodecs().Contains(audioCodec ?? string.Empty, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - return i; - } - - return null; - } - - /// <summary> - /// Gets the video transcoding profile. - /// </summary> - /// <param name="container">The container.</param> - /// <param name="audioCodec">The audio Codec.</param> - /// <param name="videoCodec">The video Codec.</param> - /// <returns>The <see cref="TranscodingProfile"/>.</returns> - public TranscodingProfile? GetVideoTranscodingProfile(string? container, string? audioCodec, string? videoCodec) - { - container = (container ?? string.Empty).TrimStart('.'); - - foreach (var i in TranscodingProfiles) - { - if (i.Type != DlnaProfileType.Video) - { - continue; - } - - if (!string.Equals(container, i.Container, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - if (!i.GetAudioCodecs().Contains(audioCodec ?? string.Empty, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - if (!string.Equals(videoCodec, i.VideoCodec, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - return i; - } - - return null; - } - - /// <summary> - /// Gets the audio media profile. - /// </summary> - /// <param name="container">The container.</param> - /// <param name="audioCodec">The audio codec.</param> - /// <param name="audioChannels">The audio channels.</param> - /// <param name="audioBitrate">The audio bitrate.</param> - /// <param name="audioSampleRate">The audio sample rate.</param> - /// <param name="audioBitDepth">The audio bit depth.</param> - /// <returns>The <see cref="ResponseProfile"/>.</returns> - public ResponseProfile? GetAudioMediaProfile(string? container, string? audioCodec, int? audioChannels, int? audioBitrate, int? audioSampleRate, int? audioBitDepth) - { - foreach (var i in ResponseProfiles) - { - if (i.Type != DlnaProfileType.Audio) - { - continue; - } - - if (!ContainerProfile.ContainsContainer(i.GetContainers(), container)) - { - continue; - } - - var audioCodecs = i.GetAudioCodecs(); - if (audioCodecs.Length > 0 && !audioCodecs.Contains(audioCodec ?? string.Empty, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - var anyOff = false; - foreach (ProfileCondition c in i.Conditions) - { - if (!ConditionProcessor.IsAudioConditionSatisfied(GetModelProfileCondition(c), audioChannels, audioBitrate, audioSampleRate, audioBitDepth)) - { - anyOff = true; - break; - } - } - - if (anyOff) - { - continue; - } - - return i; - } - - return null; - } - - /// <summary> - /// Gets the model profile condition. - /// </summary> - /// <param name="c">The c<see cref="ProfileCondition"/>.</param> - /// <returns>The <see cref="ProfileCondition"/>.</returns> - private ProfileCondition GetModelProfileCondition(ProfileCondition c) - { - return new ProfileCondition - { - Condition = c.Condition, - IsRequired = c.IsRequired, - Property = c.Property, - Value = c.Value - }; - } - - /// <summary> - /// Gets the image media profile. - /// </summary> - /// <param name="container">The container.</param> - /// <param name="width">The width.</param> - /// <param name="height">The height.</param> - /// <returns>The <see cref="ResponseProfile"/>.</returns> - public ResponseProfile? GetImageMediaProfile(string container, int? width, int? height) - { - foreach (var i in ResponseProfiles) - { - if (i.Type != DlnaProfileType.Photo) - { - continue; - } - - if (!ContainerProfile.ContainsContainer(i.GetContainers(), container)) - { - continue; - } - - var anyOff = false; - foreach (var c in i.Conditions) - { - if (!ConditionProcessor.IsImageConditionSatisfied(GetModelProfileCondition(c), width, height)) - { - anyOff = true; - break; - } - } - - if (anyOff) - { - continue; - } - - return i; - } - - return null; - } - - /// <summary> - /// Gets the video media profile. - /// </summary> - /// <param name="container">The container.</param> - /// <param name="audioCodec">The audio codec.</param> - /// <param name="videoCodec">The video codec.</param> - /// <param name="width">The width.</param> - /// <param name="height">The height.</param> - /// <param name="bitDepth">The bit depth.</param> - /// <param name="videoBitrate">The video bitrate.</param> - /// <param name="videoProfile">The video profile.</param> - /// <param name="videoRangeType">The video range type.</param> - /// <param name="videoLevel">The video level.</param> - /// <param name="videoFramerate">The video framerate.</param> - /// <param name="packetLength">The packet length.</param> - /// <param name="timestamp">The timestamp<see cref="TransportStreamTimestamp"/>.</param> - /// <param name="isAnamorphic">True if anamorphic.</param> - /// <param name="isInterlaced">True if interlaced.</param> - /// <param name="refFrames">The ref frames.</param> - /// <param name="numVideoStreams">The number of video streams.</param> - /// <param name="numAudioStreams">The number of audio streams.</param> - /// <param name="videoCodecTag">The video Codec tag.</param> - /// <param name="isAvc">True if Avc.</param> - /// <returns>The <see cref="ResponseProfile"/>.</returns> - public ResponseProfile? GetVideoMediaProfile( - string? container, - string? audioCodec, - string? videoCodec, - int? width, - int? height, - int? bitDepth, - int? videoBitrate, - string? videoProfile, - VideoRangeType videoRangeType, - double? videoLevel, - float? videoFramerate, - int? packetLength, - TransportStreamTimestamp timestamp, - bool? isAnamorphic, - bool? isInterlaced, - int? refFrames, - int? numVideoStreams, - int? numAudioStreams, - string? videoCodecTag, - bool? isAvc) - { - foreach (var i in ResponseProfiles) - { - if (i.Type != DlnaProfileType.Video) - { - continue; - } - - if (!ContainerProfile.ContainsContainer(i.GetContainers(), container)) - { - continue; - } - - var audioCodecs = i.GetAudioCodecs(); - if (audioCodecs.Length > 0 && !audioCodecs.Contains(audioCodec ?? string.Empty, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - var videoCodecs = i.GetVideoCodecs(); - if (videoCodecs.Length > 0 && !videoCodecs.Contains(videoCodec ?? string.Empty, StringComparison.OrdinalIgnoreCase)) - { - continue; - } - - var anyOff = false; - foreach (ProfileCondition c in i.Conditions) - { - if (!ConditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoRangeType, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) - { - anyOff = true; - break; - } - } - - if (anyOff) - { - continue; - } - - return i; - } - - return null; - } } } diff --git a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs b/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs deleted file mode 100644 index 74c32c523..000000000 --- a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs +++ /dev/null @@ -1,26 +0,0 @@ -#nullable disable -#pragma warning disable CS1591 - -namespace MediaBrowser.Model.Dlna -{ - public class DeviceProfileInfo - { - /// <summary> - /// Gets or sets the identifier. - /// </summary> - /// <value>The identifier.</value> - public string Id { get; set; } - - /// <summary> - /// Gets or sets the name. - /// </summary> - /// <value>The name.</value> - public string Name { get; set; } - - /// <summary> - /// Gets or sets the type. - /// </summary> - /// <value>The type.</value> - public DeviceProfileType Type { get; set; } - } -} diff --git a/MediaBrowser.Model/Dlna/DeviceProfileType.cs b/MediaBrowser.Model/Dlna/DeviceProfileType.cs deleted file mode 100644 index 46062abd0..000000000 --- a/MediaBrowser.Model/Dlna/DeviceProfileType.cs +++ /dev/null @@ -1,10 +0,0 @@ -#pragma warning disable CS1591 - -namespace MediaBrowser.Model.Dlna -{ - public enum DeviceProfileType - { - System = 0, - User = 1 - } -} diff --git a/MediaBrowser.Model/Dlna/HeaderMatchType.cs b/MediaBrowser.Model/Dlna/HeaderMatchType.cs deleted file mode 100644 index 2a9abb20e..000000000 --- a/MediaBrowser.Model/Dlna/HeaderMatchType.cs +++ /dev/null @@ -1,11 +0,0 @@ -#pragma warning disable CS1591 - -namespace MediaBrowser.Model.Dlna -{ - public enum HeaderMatchType - { - Equals = 0, - Regex = 1, - Substring = 2 - } -} diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs deleted file mode 100644 index 17c4dffcc..000000000 --- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -#nullable disable -#pragma warning disable CS1591 - -using System.Xml.Serialization; - -namespace MediaBrowser.Model.Dlna -{ - public class HttpHeaderInfo - { - [XmlAttribute("name")] - public string Name { get; set; } - - [XmlAttribute("value")] - public string Value { get; set; } - - [XmlAttribute("match")] - public HeaderMatchType Match { get; set; } - } -} diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs deleted file mode 100644 index bf9661f7f..000000000 --- a/MediaBrowser.Model/Dlna/ResponseProfile.cs +++ /dev/null @@ -1,51 +0,0 @@ -#nullable disable -#pragma warning disable CS1591 - -using System; -using System.Xml.Serialization; - -namespace MediaBrowser.Model.Dlna -{ - public class ResponseProfile - { - public ResponseProfile() - { - Conditions = Array.Empty<ProfileCondition>(); - } - - [XmlAttribute("container")] - public string Container { get; set; } - - [XmlAttribute("audioCodec")] - public string AudioCodec { get; set; } - - [XmlAttribute("videoCodec")] - public string VideoCodec { get; set; } - - [XmlAttribute("type")] - public DlnaProfileType Type { get; set; } - - [XmlAttribute("orgPn")] - public string OrgPn { get; set; } - - [XmlAttribute("mimeType")] - public string MimeType { get; set; } - - public ProfileCondition[] Conditions { get; set; } - - public string[] GetContainers() - { - return ContainerProfile.SplitValue(Container); - } - - public string[] GetAudioCodecs() - { - return ContainerProfile.SplitValue(AudioCodec); - } - - public string[] GetVideoCodecs() - { - return ContainerProfile.SplitValue(VideoCodec); - } - } -} diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index bf18d46dc..da683a17e 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using Jellyfin.Data.Enums; +using Jellyfin.Extensions; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.MediaInfo; @@ -1536,7 +1537,7 @@ namespace MediaBrowser.Model.Dlna private static void ValidateMediaOptions(MediaOptions options, bool isMediaSource) { - if (options.ItemId.Equals(default)) + if (options.ItemId.IsEmpty()) { ArgumentException.ThrowIfNullOrEmpty(options.DeviceId); } diff --git a/MediaBrowser.Model/Dlna/XmlAttribute.cs b/MediaBrowser.Model/Dlna/XmlAttribute.cs deleted file mode 100644 index 03bb2e4b1..000000000 --- a/MediaBrowser.Model/Dlna/XmlAttribute.cs +++ /dev/null @@ -1,25 +0,0 @@ -#nullable disable -#pragma warning disable CS1591 - -using System.Xml.Serialization; - -namespace MediaBrowser.Model.Dlna -{ - /// <summary> - /// Defines the <see cref="XmlAttribute" />. - /// </summary> - public class XmlAttribute - { - /// <summary> - /// Gets or sets the name of the attribute. - /// </summary> - [XmlAttribute("name")] - public string Name { get; set; } - - /// <summary> - /// Gets or sets the value of the attribute. - /// </summary> - [XmlAttribute("value")] - public string Value { get; set; } - } -} diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index d257eab92..cfff717db 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -85,11 +85,6 @@ namespace MediaBrowser.Model.Dto public string PreferredMetadataCountryCode { get; set; } - /// <summary> - /// Gets or sets a value indicating whether [supports synchronize]. - /// </summary> - public bool? SupportsSync { get; set; } - public string Container { get; set; } /// <summary> diff --git a/MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs b/MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs new file mode 100644 index 000000000..7bfedf973 --- /dev/null +++ b/MediaBrowser.Model/Dto/UpdateUserItemDataDto.cs @@ -0,0 +1,76 @@ +using System; + +namespace MediaBrowser.Model.Dto +{ + /// <summary> + /// This is used by the api to get information about a item user data. + /// </summary> + public class UpdateUserItemDataDto + { + /// <summary> + /// Gets or sets the rating. + /// </summary> + /// <value>The rating.</value> + public double? Rating { get; set; } + + /// <summary> + /// Gets or sets the played percentage. + /// </summary> + /// <value>The played percentage.</value> + public double? PlayedPercentage { get; set; } + + /// <summary> + /// Gets or sets the unplayed item count. + /// </summary> + /// <value>The unplayed item count.</value> + public int? UnplayedItemCount { get; set; } + + /// <summary> + /// Gets or sets the playback position ticks. + /// </summary> + /// <value>The playback position ticks.</value> + public long? PlaybackPositionTicks { get; set; } + + /// <summary> + /// Gets or sets the play count. + /// </summary> + /// <value>The play count.</value> + public int? PlayCount { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is favorite. + /// </summary> + /// <value><c>true</c> if this instance is favorite; otherwise, <c>false</c>.</value> + public bool? IsFavorite { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this <see cref="UpdateUserItemDataDto" /> is likes. + /// </summary> + /// <value><c>null</c> if [likes] contains no value, <c>true</c> if [likes]; otherwise, <c>false</c>.</value> + public bool? Likes { get; set; } + + /// <summary> + /// Gets or sets the last played date. + /// </summary> + /// <value>The last played date.</value> + public DateTime? LastPlayedDate { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this <see cref="UserItemDataDto" /> is played. + /// </summary> + /// <value><c>true</c> if played; otherwise, <c>false</c>.</value> + public bool? Played { get; set; } + + /// <summary> + /// Gets or sets the key. + /// </summary> + /// <value>The key.</value> + public string? Key { get; set; } + + /// <summary> + /// Gets or sets the item identifier. + /// </summary> + /// <value>The item identifier.</value> + public string? ItemId { get; set; } + } +} diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 34642b83a..ae4a008bb 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Globalization; using System.Linq; using System.Text; @@ -214,6 +215,27 @@ namespace MediaBrowser.Model.Entities } } + /// <summary> + /// Gets the audio spatial format. + /// </summary> + /// <value>The audio spatial format.</value> + [DefaultValue(AudioSpatialFormat.None)] + public AudioSpatialFormat AudioSpatialFormat + { + get + { + if (Type != MediaStreamType.Audio || string.IsNullOrEmpty(Profile)) + { + return AudioSpatialFormat.None; + } + + return + Profile.Contains("Dolby Atmos", StringComparison.OrdinalIgnoreCase) ? AudioSpatialFormat.DolbyAtmos : + Profile.Contains("DTS:X", StringComparison.OrdinalIgnoreCase) ? AudioSpatialFormat.DTSX : + AudioSpatialFormat.None; + } + } + public string LocalizedUndefined { get; set; } public string LocalizedDefault { get; set; } diff --git a/MediaBrowser.Model/Entities/UserDataSaveReason.cs b/MediaBrowser.Model/Entities/UserDataSaveReason.cs index 20404e6f4..b8e73a98c 100644 --- a/MediaBrowser.Model/Entities/UserDataSaveReason.cs +++ b/MediaBrowser.Model/Entities/UserDataSaveReason.cs @@ -33,6 +33,11 @@ namespace MediaBrowser.Model.Entities /// <summary> /// The import. /// </summary> - Import = 6 + Import = 6, + + /// <summary> + /// API call updated item user data. + /// </summary> + UpdateUserData = 7, } } diff --git a/MediaBrowser.Model/IO/IStreamHelper.cs b/MediaBrowser.Model/IO/IStreamHelper.cs index f900da556..034a6bf8b 100644 --- a/MediaBrowser.Model/IO/IStreamHelper.cs +++ b/MediaBrowser.Model/IO/IStreamHelper.cs @@ -13,8 +13,6 @@ namespace MediaBrowser.Model.IO Task CopyToAsync(Stream source, Stream destination, int bufferSize, int emptyReadLimit, CancellationToken cancellationToken); - Task CopyToAsync(Stream source, Stream destination, long copyLength, CancellationToken cancellationToken); - Task CopyUntilCancelled(Stream source, Stream target, int bufferSize, CancellationToken cancellationToken); } } diff --git a/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs b/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs deleted file mode 100644 index 80a646195..000000000 --- a/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs +++ /dev/null @@ -1,12 +0,0 @@ -#pragma warning disable CS1591 - -namespace MediaBrowser.Model.LiveTv -{ - public enum LiveTvTunerStatus - { - Available = 0, - Disabled = 1, - RecordingTv = 2, - LiveTv = 3 - } -} diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 242a1c6e9..49d7c0bcb 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -175,13 +175,6 @@ namespace MediaBrowser.Model.Querying /// </summary> Studios, - BasicSyncInfo, - - /// <summary> - /// The synchronize information. - /// </summary> - SyncInfo, - /// <summary> /// The taglines of the item. /// </summary> diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs index 7fefce9cd..597845fc1 100644 --- a/MediaBrowser.Model/Session/ClientCapabilities.cs +++ b/MediaBrowser.Model/Session/ClientCapabilities.cs @@ -23,14 +23,8 @@ namespace MediaBrowser.Model.Session public bool SupportsMediaControl { get; set; } - public bool SupportsContentUploading { get; set; } - - public string MessageCallbackUrl { get; set; } - public bool SupportsPersistentIdentifier { get; set; } - public bool SupportsSync { get; set; } - public DeviceProfile DeviceProfile { get; set; } public string AppStoreUrl { get; set; } |
