WIP move baseitem to jellyfin.db

This commit is contained in:
JPVenson
2024-09-08 16:56:14 +00:00
committed by GitHub
parent d0b4b2ddb3
commit ee1bdf4e22
16 changed files with 1320 additions and 1646 deletions

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Jellyfin.Data.Entities;
#pragma warning disable CA1708 // Identifiers should differ by more than case
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
public class AncestorId
{
public Guid Id { get; set; }
public Guid ItemId { get; set; }
public required BaseItem Item { get; set; }
public string? AncestorIdText { get; set; }
}

View File

@@ -0,0 +1,21 @@
using System;
namespace Jellyfin.Data.Entities;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
public class AttachmentStreamInfo
{
public required Guid ItemId { get; set; }
public required int Index { get; set; }
public required string Codec { get; set; }
public string? CodecTag { get; set; }
public string? Comment { get; set; }
public string? Filename { get; set; }
public string? MimeType { get; set; }
}

View File

@@ -0,0 +1,164 @@
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
public class BaseItem
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
public required string Type { get; set; }
public IReadOnlyList<byte>? Data { get; set; }
public Guid? ParentId { 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? LockedFields { get; set; }
public string? Studios { get; set; }
public string? Audio { 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 string? TopParentId { get; set; }
public string? TrailerTypes { 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? UserDataKey { get; set; }
public string? SeasonName { get; set; }
public Guid? SeasonId { get; set; }
public Guid? SeriesId { get; set; }
public string? ExternalSeriesId { get; set; }
public string? Tagline { get; set; }
public string? ProviderIds { get; set; }
public string? Images { get; set; }
public string? ProductionLocations { get; set; }
public string? ExtraIds { get; set; }
public int? TotalBitrate { get; set; }
public string? 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; }
}

View File

@@ -0,0 +1,22 @@
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
public class Chapter
{
public Guid ItemId { get; set; }
public required int ChapterIndex { get; set; }
public required long StartPositionTicks { get; set; }
public string? Name { get; set; }
public string? ImagePath { get; set; }
public DateTime? ImageDateModified { get; set; }
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Jellyfin.Data.Entities;
public class ItemValue
{
public Guid ItemId { get; set; }
public required BaseItem Item { get; set; }
public required int Type { get; set; }
public required string Value { get; set; }
public required string CleanValue { get; set; }
}

View File

@@ -0,0 +1,101 @@
using System;
namespace Jellyfin.Data.Entities;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
public class MediaStreamInfo
{
public Guid ItemId { get; set; }
public required BaseItem Item { get; set; }
public int StreamIndex { get; set; }
public string? 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 required int BitRate { get; set; }
public required int Channels { get; set; }
public required int SampleRate { get; set; }
public bool IsDefault { get; set; }
public bool IsForced { get; set; }
public bool IsExternal { get; set; }
public required int Height { get; set; }
public required int Width { get; set; }
public required float AverageFrameRate { get; set; }
public required float RealFrameRate { get; set; }
public required float Level { get; set; }
public string? PixelFormat { get; set; }
public required int BitDepth { get; set; }
public required bool IsAnamorphic { get; set; }
public required int RefFrames { get; set; }
public required string CodecTag { get; set; }
public required string Comment { get; set; }
public required string NalLengthSize { get; set; }
public required bool IsAvc { get; set; }
public required string Title { get; set; }
public required string TimeBase { get; set; }
public required string CodecTimeBase { get; set; }
public required string ColorPrimaries { get; set; }
public required string ColorSpace { get; set; }
public required string ColorTransfer { get; set; }
public required int DvVersionMajor { get; set; }
public required int DvVersionMinor { get; set; }
public required int DvProfile { get; set; }
public required int DvLevel { get; set; }
public required int RpuPresentFlag { get; set; }
public required int ElPresentFlag { get; set; }
public required int BlPresentFlag { get; set; }
public required int DvBlSignalCompatibilityId { get; set; }
public required bool IsHearingImpaired { get; set; }
public required int Rotation { get; set; }
public string? KeyFrames { get; set; }
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Jellyfin.Data.Entities;
public class People
{
public Guid ItemId { get; set; }
public required string Name { get; set; }
public string? Role { get; set; }
public string? PersonType { get; set; }
public int? SortOrder { get; set; }
public int? ListOrder { get; set; }
}