diff options
Diffstat (limited to 'Jellyfin.Data')
20 files changed, 990 insertions, 10 deletions
diff --git a/Jellyfin.Data/Entities/AncestorId.cs b/Jellyfin.Data/Entities/AncestorId.cs new file mode 100644 index 000000000..ef0fe0ba7 --- /dev/null +++ b/Jellyfin.Data/Entities/AncestorId.cs @@ -0,0 +1,29 @@ +using System; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Represents the relational informations for an <see cref="BaseItemEntity"/>. +/// </summary> +public class AncestorId +{ + /// <summary> + /// Gets or Sets the AncestorId. + /// </summary> + public required Guid ParentItemId { get; set; } + + /// <summary> + /// Gets or Sets the related BaseItem. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets the ParentItem. + /// </summary> + public required BaseItemEntity ParentItem { get; set; } + + /// <summary> + /// Gets or Sets the Child item. + /// </summary> + public required BaseItemEntity Item { get; set; } +} diff --git a/Jellyfin.Data/Entities/AttachmentStreamInfo.cs b/Jellyfin.Data/Entities/AttachmentStreamInfo.cs new file mode 100644 index 000000000..77b627f37 --- /dev/null +++ b/Jellyfin.Data/Entities/AttachmentStreamInfo.cs @@ -0,0 +1,49 @@ +using System; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Provides informations about an Attachment to an <see cref="BaseItemEntity"/>. +/// </summary> +public class AttachmentStreamInfo +{ + /// <summary> + /// Gets or Sets the <see cref="BaseItemEntity"/> reference. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets the <see cref="BaseItemEntity"/> reference. + /// </summary> + public required BaseItemEntity Item { get; set; } + + /// <summary> + /// Gets or Sets The index within the source file. + /// </summary> + public required int Index { get; set; } + + /// <summary> + /// Gets or Sets the codec of the attachment. + /// </summary> + public required string Codec { get; set; } + + /// <summary> + /// Gets or Sets the codec tag of the attachment. + /// </summary> + public string? CodecTag { get; set; } + + /// <summary> + /// Gets or Sets the comment of the attachment. + /// </summary> + public string? Comment { get; set; } + + /// <summary> + /// Gets or Sets the filename of the attachment. + /// </summary> + public string? Filename { get; set; } + + /// <summary> + /// Gets or Sets the attachments mimetype. + /// </summary> + public string? MimeType { get; set; } +} diff --git a/Jellyfin.Data/Entities/BaseItemEntity.cs b/Jellyfin.Data/Entities/BaseItemEntity.cs new file mode 100644 index 000000000..0c9020a66 --- /dev/null +++ b/Jellyfin.Data/Entities/BaseItemEntity.cs @@ -0,0 +1,186 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Jellyfin.Data.Entities; + +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#pragma warning disable CA2227 // Collection properties should be read only + +public class BaseItemEntity +{ + public required Guid Id { get; set; } + + public required string Type { get; set; } + + public string? Data { get; set; } + + public string? Path { get; set; } + + public DateTime StartDate { get; set; } + + public DateTime EndDate { get; set; } + + public string? ChannelId { get; set; } + + public bool IsMovie { get; set; } + + public float? CommunityRating { get; set; } + + public string? CustomRating { get; set; } + + public int? IndexNumber { get; set; } + + public bool IsLocked { get; set; } + + public string? Name { get; set; } + + public string? OfficialRating { get; set; } + + public string? MediaType { get; set; } + + public string? Overview { get; set; } + + public int? ParentIndexNumber { get; set; } + + public DateTime? PremiereDate { get; set; } + + public int? ProductionYear { get; set; } + + public string? Genres { get; set; } + + public string? SortName { get; set; } + + public string? ForcedSortName { get; set; } + + public long? RunTimeTicks { get; set; } + + public DateTime? DateCreated { get; set; } + + public DateTime? DateModified { get; set; } + + public bool IsSeries { get; set; } + + public string? EpisodeTitle { get; set; } + + public bool IsRepeat { get; set; } + + public string? PreferredMetadataLanguage { get; set; } + + public string? PreferredMetadataCountryCode { get; set; } + + public DateTime? DateLastRefreshed { get; set; } + + public DateTime? DateLastSaved { get; set; } + + public bool IsInMixedFolder { get; set; } + + public string? Studios { get; set; } + + public string? ExternalServiceId { get; set; } + + public string? Tags { get; set; } + + public bool IsFolder { get; set; } + + public int? InheritedParentalRatingValue { get; set; } + + public string? UnratedType { get; set; } + + public float? CriticRating { get; set; } + + public string? CleanName { get; set; } + + public string? PresentationUniqueKey { get; set; } + + public string? OriginalTitle { get; set; } + + public string? PrimaryVersionId { get; set; } + + public DateTime? DateLastMediaAdded { get; set; } + + public string? Album { get; set; } + + public float? LUFS { get; set; } + + public float? NormalizationGain { get; set; } + + public bool IsVirtualItem { get; set; } + + public string? SeriesName { get; set; } + + public string? SeasonName { get; set; } + + public string? ExternalSeriesId { get; set; } + + public string? Tagline { get; set; } + + public string? ProductionLocations { get; set; } + + public string? ExtraIds { get; set; } + + public int? TotalBitrate { get; set; } + + public BaseItemExtraType? ExtraType { get; set; } + + public string? Artists { get; set; } + + public string? AlbumArtists { get; set; } + + public string? ExternalId { get; set; } + + public string? SeriesPresentationUniqueKey { get; set; } + + public string? ShowId { get; set; } + + public string? OwnerId { get; set; } + + public int? Width { get; set; } + + public int? Height { get; set; } + + public long? Size { get; set; } + + public ProgramAudioEntity? Audio { get; set; } + + public Guid? ParentId { get; set; } + + public Guid? TopParentId { get; set; } + + public Guid? SeasonId { get; set; } + + public Guid? SeriesId { get; set; } + + public ICollection<PeopleBaseItemMap>? Peoples { get; set; } + + public ICollection<UserData>? UserData { get; set; } + + public ICollection<ItemValueMap>? ItemValues { get; set; } + + public ICollection<MediaStreamInfo>? MediaStreams { get; set; } + + public ICollection<Chapter>? Chapters { get; set; } + + public ICollection<BaseItemProvider>? Provider { get; set; } + + public ICollection<AncestorId>? ParentAncestors { get; set; } + + public ICollection<AncestorId>? Children { get; set; } + + public ICollection<BaseItemMetadataField>? LockedFields { get; set; } + + public ICollection<BaseItemTrailerType>? TrailerTypes { get; set; } + + public ICollection<BaseItemImageInfo>? Images { get; set; } + + // those are references to __LOCAL__ ids not DB ids ... TODO: Bring the whole folder structure into the DB + // public ICollection<BaseItemEntity>? SeriesEpisodes { get; set; } + // public BaseItemEntity? Series { get; set; } + // public BaseItemEntity? Season { get; set; } + // public BaseItemEntity? Parent { get; set; } + // public ICollection<BaseItemEntity>? DirectChildren { get; set; } + // public BaseItemEntity? TopParent { get; set; } + // public ICollection<BaseItemEntity>? AllChildren { get; set; } + // public ICollection<BaseItemEntity>? SeasonEpisodes { get; set; } +} diff --git a/Jellyfin.Data/Entities/BaseItemExtraType.cs b/Jellyfin.Data/Entities/BaseItemExtraType.cs new file mode 100644 index 000000000..341697436 --- /dev/null +++ b/Jellyfin.Data/Entities/BaseItemExtraType.cs @@ -0,0 +1,18 @@ +namespace Jellyfin.Data.Entities; + +#pragma warning disable CS1591 +public enum BaseItemExtraType +{ + Unknown = 0, + Clip = 1, + Trailer = 2, + BehindTheScenes = 3, + DeletedScene = 4, + Interview = 5, + Scene = 6, + Sample = 7, + ThemeSong = 8, + ThemeVideo = 9, + Featurette = 10, + Short = 11 +} diff --git a/Jellyfin.Data/Entities/BaseItemImageInfo.cs b/Jellyfin.Data/Entities/BaseItemImageInfo.cs new file mode 100644 index 000000000..6390cac58 --- /dev/null +++ b/Jellyfin.Data/Entities/BaseItemImageInfo.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; + +namespace Jellyfin.Data.Entities; +#pragma warning disable CA2227 + +/// <summary> +/// Enum TrailerTypes. +/// </summary> +public class BaseItemImageInfo +{ + /// <summary> + /// Gets or Sets. + /// </summary> + public required Guid Id { get; set; } + + /// <summary> + /// Gets or Sets the path to the original image. + /// </summary> + public required string Path { get; set; } + + /// <summary> + /// Gets or Sets the time the image was last modified. + /// </summary> + public DateTime DateModified { get; set; } + + /// <summary> + /// Gets or Sets the imagetype. + /// </summary> + public ImageInfoImageType ImageType { get; set; } + + /// <summary> + /// Gets or Sets the width of the original image. + /// </summary> + public int Width { get; set; } + + /// <summary> + /// Gets or Sets the height of the original image. + /// </summary> + public int Height { get; set; } + +#pragma warning disable CA1819 + /// <summary> + /// Gets or Sets the blurhash. + /// </summary> + public byte[]? Blurhash { get; set; } + + /// <summary> + /// Gets or Sets the reference id to the BaseItem. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets the referenced Item. + /// </summary> + public required BaseItemEntity Item { get; set; } +} diff --git a/Jellyfin.Data/Entities/BaseItemMetadataField.cs b/Jellyfin.Data/Entities/BaseItemMetadataField.cs new file mode 100644 index 000000000..c9d44c046 --- /dev/null +++ b/Jellyfin.Data/Entities/BaseItemMetadataField.cs @@ -0,0 +1,24 @@ +using System; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Enum MetadataFields. +/// </summary> +public class BaseItemMetadataField +{ + /// <summary> + /// Gets or Sets Numerical ID of this enumeratable. + /// </summary> + public required int Id { get; set; } + + /// <summary> + /// Gets or Sets all referenced <see cref="BaseItemEntity"/>. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets all referenced <see cref="BaseItemEntity"/>. + /// </summary> + public required BaseItemEntity Item { get; set; } +} diff --git a/Jellyfin.Data/Entities/BaseItemProvider.cs b/Jellyfin.Data/Entities/BaseItemProvider.cs new file mode 100644 index 000000000..9a1565728 --- /dev/null +++ b/Jellyfin.Data/Entities/BaseItemProvider.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Represents a Key-Value relation of an BaseItem's provider. +/// </summary> +public class BaseItemProvider +{ + /// <summary> + /// Gets or Sets the reference ItemId. + /// </summary> + public Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets the reference BaseItem. + /// </summary> + public required BaseItemEntity Item { get; set; } + + /// <summary> + /// Gets or Sets the ProvidersId. + /// </summary> + public required string ProviderId { get; set; } + + /// <summary> + /// Gets or Sets the Providers Value. + /// </summary> + public required string ProviderValue { get; set; } +} diff --git a/Jellyfin.Data/Entities/BaseItemTrailerType.cs b/Jellyfin.Data/Entities/BaseItemTrailerType.cs new file mode 100644 index 000000000..fb31fc8a4 --- /dev/null +++ b/Jellyfin.Data/Entities/BaseItemTrailerType.cs @@ -0,0 +1,24 @@ +using System; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Enum TrailerTypes. +/// </summary> +public class BaseItemTrailerType +{ + /// <summary> + /// Gets or Sets Numerical ID of this enumeratable. + /// </summary> + public required int Id { get; set; } + + /// <summary> + /// Gets or Sets all referenced <see cref="BaseItemEntity"/>. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets all referenced <see cref="BaseItemEntity"/>. + /// </summary> + public required BaseItemEntity Item { get; set; } +} diff --git a/Jellyfin.Data/Entities/Chapter.cs b/Jellyfin.Data/Entities/Chapter.cs new file mode 100644 index 000000000..579442cdb --- /dev/null +++ b/Jellyfin.Data/Entities/Chapter.cs @@ -0,0 +1,44 @@ +using System; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// The Chapter entity. +/// </summary> +public class Chapter +{ + /// <summary> + /// Gets or Sets the <see cref="BaseItemEntity"/> reference id. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets the <see cref="BaseItemEntity"/> reference. + /// </summary> + public required BaseItemEntity Item { get; set; } + + /// <summary> + /// Gets or Sets the chapters index in Item. + /// </summary> + public required int ChapterIndex { get; set; } + + /// <summary> + /// Gets or Sets the position within the source file. + /// </summary> + public required long StartPositionTicks { get; set; } + + /// <summary> + /// Gets or Sets the common name. + /// </summary> + public string? Name { get; set; } + + /// <summary> + /// Gets or Sets the image path. + /// </summary> + public string? ImagePath { get; set; } + + /// <summary> + /// Gets or Sets the time the image was last modified. + /// </summary> + public DateTime? ImageDateModified { get; set; } +} diff --git a/Jellyfin.Data/Entities/ImageInfoImageType.cs b/Jellyfin.Data/Entities/ImageInfoImageType.cs new file mode 100644 index 000000000..f78178dd2 --- /dev/null +++ b/Jellyfin.Data/Entities/ImageInfoImageType.cs @@ -0,0 +1,76 @@ +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Enum ImageType. +/// </summary> +public enum ImageInfoImageType +{ + /// <summary> + /// The primary. + /// </summary> + Primary = 0, + + /// <summary> + /// The art. + /// </summary> + Art = 1, + + /// <summary> + /// The backdrop. + /// </summary> + Backdrop = 2, + + /// <summary> + /// The banner. + /// </summary> + Banner = 3, + + /// <summary> + /// The logo. + /// </summary> + Logo = 4, + + /// <summary> + /// The thumb. + /// </summary> + Thumb = 5, + + /// <summary> + /// The disc. + /// </summary> + Disc = 6, + + /// <summary> + /// The box. + /// </summary> + Box = 7, + + /// <summary> + /// The screenshot. + /// </summary> + /// <remarks> + /// This enum value is obsolete. + /// XmlSerializer does not serialize/deserialize objects that are marked as [Obsolete]. + /// </remarks> + Screenshot = 8, + + /// <summary> + /// The menu. + /// </summary> + Menu = 9, + + /// <summary> + /// The chapter image. + /// </summary> + Chapter = 10, + + /// <summary> + /// The box rear. + /// </summary> + BoxRear = 11, + + /// <summary> + /// The user profile image. + /// </summary> + Profile = 12 +} diff --git a/Jellyfin.Data/Entities/ItemValue.cs b/Jellyfin.Data/Entities/ItemValue.cs new file mode 100644 index 000000000..7b1048c10 --- /dev/null +++ b/Jellyfin.Data/Entities/ItemValue.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Represents an ItemValue for a BaseItem. +/// </summary> +public class ItemValue +{ + /// <summary> + /// Gets or Sets the ItemValueId. + /// </summary> + public required Guid ItemValueId { get; set; } + + /// <summary> + /// Gets or Sets the Type. + /// </summary> + public required ItemValueType Type { get; set; } + + /// <summary> + /// Gets or Sets the Value. + /// </summary> + public required string Value { get; set; } + + /// <summary> + /// Gets or Sets the sanatised Value. + /// </summary> + public required string CleanValue { get; set; } + + /// <summary> + /// Gets or Sets all associated BaseItems. + /// </summary> +#pragma warning disable CA2227 // Collection properties should be read only + public ICollection<ItemValueMap>? BaseItemsMap { get; set; } +#pragma warning restore CA2227 // Collection properties should be read only +} diff --git a/Jellyfin.Data/Entities/ItemValueMap.cs b/Jellyfin.Data/Entities/ItemValueMap.cs new file mode 100644 index 000000000..94db6a011 --- /dev/null +++ b/Jellyfin.Data/Entities/ItemValueMap.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Mapping table for the ItemValue BaseItem relation. +/// </summary> +public class ItemValueMap +{ + /// <summary> + /// Gets or Sets the ItemId. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets the ItemValueId. + /// </summary> + public required Guid ItemValueId { get; set; } + + /// <summary> + /// Gets or Sets the referenced <see cref="BaseItemEntity"/>. + /// </summary> + public required BaseItemEntity Item { get; set; } + + /// <summary> + /// Gets or Sets the referenced <see cref="ItemValue"/>. + /// </summary> + public required ItemValue ItemValue { get; set; } +} diff --git a/Jellyfin.Data/Entities/ItemValueType.cs b/Jellyfin.Data/Entities/ItemValueType.cs new file mode 100644 index 000000000..006036b40 --- /dev/null +++ b/Jellyfin.Data/Entities/ItemValueType.cs @@ -0,0 +1,41 @@ +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Provides the Value types for an <see cref="ItemValue"/>. +/// </summary> +#pragma warning disable CA1027 // Mark enums with FlagsAttribute +public enum ItemValueType +#pragma warning restore CA1027 // Mark enums with FlagsAttribute +{ + /// <summary> + /// Artists. + /// </summary> +#pragma warning disable CA1008 // Enums should have zero value. Cannot apply here. + Artist = 0, +#pragma warning restore CA1008 // Enums should have zero value + + /// <summary> + /// Album. + /// </summary> + AlbumArtist = 1, + + /// <summary> + /// Genre. + /// </summary> + Genre = 2, + + /// <summary> + /// Studios. + /// </summary> + Studios = 3, + + /// <summary> + /// Tags. + /// </summary> + Tags = 4, + + /// <summary> + /// InheritedTags. + /// </summary> + InheritedTags = 6, +} diff --git a/Jellyfin.Data/Entities/MediaStreamInfo.cs b/Jellyfin.Data/Entities/MediaStreamInfo.cs new file mode 100644 index 000000000..79053652a --- /dev/null +++ b/Jellyfin.Data/Entities/MediaStreamInfo.cs @@ -0,0 +1,102 @@ +using System; +using System.Diagnostics.CodeAnalysis; + +namespace Jellyfin.Data.Entities; + +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +public class MediaStreamInfo +{ + public required Guid ItemId { get; set; } + + public required BaseItemEntity Item { get; set; } + + public int StreamIndex { get; set; } + + public required MediaStreamTypeEntity StreamType { get; set; } + + public string? Codec { get; set; } + + public string? Language { get; set; } + + public string? ChannelLayout { get; set; } + + public string? Profile { get; set; } + + public string? AspectRatio { get; set; } + + public string? Path { get; set; } + + public bool? IsInterlaced { get; set; } + + public int? BitRate { get; set; } + + public int? Channels { get; set; } + + public int? SampleRate { get; set; } + + public bool IsDefault { get; set; } + + public bool IsForced { get; set; } + + public bool IsExternal { get; set; } + + public int? Height { get; set; } + + public int? Width { get; set; } + + public float? AverageFrameRate { get; set; } + + public float? RealFrameRate { get; set; } + + public float? Level { get; set; } + + public string? PixelFormat { get; set; } + + public int? BitDepth { get; set; } + + public bool? IsAnamorphic { get; set; } + + public int? RefFrames { get; set; } + + public string? CodecTag { get; set; } + + public string? Comment { get; set; } + + public string? NalLengthSize { get; set; } + + public bool? IsAvc { get; set; } + + public string? Title { get; set; } + + public string? TimeBase { get; set; } + + public string? CodecTimeBase { get; set; } + + public string? ColorPrimaries { get; set; } + + public string? ColorSpace { get; set; } + + public string? ColorTransfer { get; set; } + + public int? DvVersionMajor { get; set; } + + public int? DvVersionMinor { get; set; } + + public int? DvProfile { get; set; } + + public int? DvLevel { get; set; } + + public int? RpuPresentFlag { get; set; } + + public int? ElPresentFlag { get; set; } + + public int? BlPresentFlag { get; set; } + + public int? DvBlSignalCompatibilityId { get; set; } + + public bool? IsHearingImpaired { get; set; } + + public int? Rotation { get; set; } + + public string? KeyFrames { get; set; } +} diff --git a/Jellyfin.Data/Entities/MediaStreamTypeEntity.cs b/Jellyfin.Data/Entities/MediaStreamTypeEntity.cs new file mode 100644 index 000000000..f57672a2c --- /dev/null +++ b/Jellyfin.Data/Entities/MediaStreamTypeEntity.cs @@ -0,0 +1,37 @@ +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Enum MediaStreamType. +/// </summary> +public enum MediaStreamTypeEntity +{ + /// <summary> + /// The audio. + /// </summary> + Audio = 0, + + /// <summary> + /// The video. + /// </summary> + Video = 1, + + /// <summary> + /// The subtitle. + /// </summary> + Subtitle = 2, + + /// <summary> + /// The embedded image. + /// </summary> + EmbeddedImage = 3, + + /// <summary> + /// The data. + /// </summary> + Data = 4, + + /// <summary> + /// The lyric. + /// </summary> + Lyric = 5 +} diff --git a/Jellyfin.Data/Entities/People.cs b/Jellyfin.Data/Entities/People.cs new file mode 100644 index 000000000..b1834a70d --- /dev/null +++ b/Jellyfin.Data/Entities/People.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; + +namespace Jellyfin.Data.Entities; +#pragma warning disable CA2227 // Collection properties should be read only + +/// <summary> +/// People entity. +/// </summary> +public class People +{ + /// <summary> + /// Gets or Sets the PeopleId. + /// </summary> + public required Guid Id { get; set; } + + /// <summary> + /// Gets or Sets the Persons Name. + /// </summary> + public required string Name { get; set; } + + /// <summary> + /// Gets or Sets the Type. + /// </summary> + public string? PersonType { get; set; } + + /// <summary> + /// Gets or Sets the mapping of People to BaseItems. + /// </summary> + public ICollection<PeopleBaseItemMap>? BaseItems { get; set; } +} diff --git a/Jellyfin.Data/Entities/PeopleBaseItemMap.cs b/Jellyfin.Data/Entities/PeopleBaseItemMap.cs new file mode 100644 index 000000000..5ce7300b5 --- /dev/null +++ b/Jellyfin.Data/Entities/PeopleBaseItemMap.cs @@ -0,0 +1,44 @@ +using System; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Mapping table for People to BaseItems. +/// </summary> +public class PeopleBaseItemMap +{ + /// <summary> + /// Gets or Sets the SortOrder. + /// </summary> + public int? SortOrder { get; set; } + + /// <summary> + /// Gets or Sets the ListOrder. + /// </summary> + public int? ListOrder { get; set; } + + /// <summary> + /// Gets or Sets the Role name the assosiated actor played in the <see cref="BaseItemEntity"/>. + /// </summary> + public string? Role { get; set; } + + /// <summary> + /// Gets or Sets The ItemId. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets Reference Item. + /// </summary> + public required BaseItemEntity Item { get; set; } + + /// <summary> + /// Gets or Sets The PeopleId. + /// </summary> + public required Guid PeopleId { get; set; } + + /// <summary> + /// Gets or Sets Reference People. + /// </summary> + public required People People { get; set; } +} diff --git a/Jellyfin.Data/Entities/ProgramAudioEntity.cs b/Jellyfin.Data/Entities/ProgramAudioEntity.cs new file mode 100644 index 000000000..5b225a002 --- /dev/null +++ b/Jellyfin.Data/Entities/ProgramAudioEntity.cs @@ -0,0 +1,37 @@ +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Lists types of Audio. +/// </summary> +public enum ProgramAudioEntity +{ + /// <summary> + /// Mono. + /// </summary> + Mono = 0, + + /// <summary> + /// Sterio. + /// </summary> + Stereo = 1, + + /// <summary> + /// Dolby. + /// </summary> + Dolby = 2, + + /// <summary> + /// DolbyDigital. + /// </summary> + DolbyDigital = 3, + + /// <summary> + /// Thx. + /// </summary> + Thx = 4, + + /// <summary> + /// Atmos. + /// </summary> + Atmos = 5 +} diff --git a/Jellyfin.Data/Entities/UserData.cs b/Jellyfin.Data/Entities/UserData.cs new file mode 100644 index 000000000..05ab6dd2d --- /dev/null +++ b/Jellyfin.Data/Entities/UserData.cs @@ -0,0 +1,92 @@ +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Jellyfin.Data.Entities; + +/// <summary> +/// Provides <see cref="BaseItemEntity"/> and <see cref="User"/> related data. +/// </summary> +public class UserData +{ + /// <summary> + /// Gets or sets the custom data key. + /// </summary> + /// <value>The rating.</value> + public required string CustomDataKey { get; set; } + + /// <summary> + /// Gets or sets the users 0-10 rating. + /// </summary> + /// <value>The rating.</value> + public double? Rating { 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 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="UserData" /> is played. + /// </summary> + /// <value><c>true</c> if played; otherwise, <c>false</c>.</value> + public bool Played { get; set; } + + /// <summary> + /// Gets or sets the index of the audio stream. + /// </summary> + /// <value>The index of the audio stream.</value> + public int? AudioStreamIndex { get; set; } + + /// <summary> + /// Gets or sets the index of the subtitle stream. + /// </summary> + /// <value>The index of the subtitle stream.</value> + public int? SubtitleStreamIndex { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether the item is liked or not. + /// This should never be serialized. + /// </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 key. + /// </summary> + /// <value>The key.</value> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets the BaseItem. + /// </summary> + public required BaseItemEntity? Item { get; set; } + + /// <summary> + /// Gets or Sets the UserId. + /// </summary> + public required Guid UserId { get; set; } + + /// <summary> + /// Gets or Sets the User. + /// </summary> + public required User? User { get; set; } +} diff --git a/Jellyfin.Data/Enums/ItemSortBy.cs b/Jellyfin.Data/Enums/ItemSortBy.cs index 17bf1166d..ef7650294 100644 --- a/Jellyfin.Data/Enums/ItemSortBy.cs +++ b/Jellyfin.Data/Enums/ItemSortBy.cs @@ -154,14 +154,4 @@ public enum ItemSortBy /// The index number. /// </summary> IndexNumber = 29, - - /// <summary> - /// The similarity score. - /// </summary> - SimilarityScore = 30, - - /// <summary> - /// The search score. - /// </summary> - SearchScore = 31, } |
