diff options
| author | JPVenson <6794763+JPVenson@users.noreply.github.com> | 2024-10-09 11:22:52 +0000 |
|---|---|---|
| committer | JPVenson <6794763+JPVenson@users.noreply.github.com> | 2024-10-09 11:22:52 +0000 |
| commit | c2844bda3b7605257d7b2f8d146077cea6dd0b08 (patch) | |
| tree | 75f31171179ea555c13bc47973e0289ee5685abd /Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs | |
| parent | 3dc402433870ba3dcd0f0c9f282ea96538e43c8b (diff) | |
Added EF BaseItem migration
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs new file mode 100644 index 000000000..7e572f9a3 --- /dev/null +++ b/Jellyfin.Server.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs @@ -0,0 +1,22 @@ +using System; +using Jellyfin.Data.Entities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace Jellyfin.Server.Implementations.ModelConfiguration; + +/// <summary> +/// People configuration. +/// </summary> +public class MediaStreamInfoConfiguration : IEntityTypeConfiguration<MediaStreamInfo> +{ + /// <inheritdoc/> + public void Configure(EntityTypeBuilder<MediaStreamInfo> builder) + { + builder.HasKey(e => new { e.ItemId, e.StreamIndex }); + builder.HasIndex(e => e.StreamIndex); + builder.HasIndex(e => e.StreamType); + builder.HasIndex(e => new { e.StreamIndex, e.StreamType }); + builder.HasIndex(e => new { e.StreamIndex, e.StreamType, e.Language }); + } +} |
