< Summary - Jellyfin

Information
Class: Jellyfin.Database.Implementations.ModelConfiguration.MediaStreamInfoConfiguration
Assembly: Jellyfin.Database.Implementations
File(s): /srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 21
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/16/2026 - 12:15:55 AM Line coverage: 100% (2/2) Total lines: 1710/29/2026 - 12:17:11 AM Line coverage: 100% (3/3) Total lines: 21

Coverage delta

Coverage delta 1 -1

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Configure(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs

#LineLine coverage
 1using Jellyfin.Database.Implementations.Entities;
 2using Microsoft.EntityFrameworkCore;
 3using Microsoft.EntityFrameworkCore.Metadata.Builders;
 4
 5namespace Jellyfin.Database.Implementations.ModelConfiguration;
 6
 7/// <summary>
 8/// People configuration.
 9/// </summary>
 10public class MediaStreamInfoConfiguration : IEntityTypeConfiguration<MediaStreamInfo>
 11{
 12    /// <inheritdoc/>
 13    public void Configure(EntityTypeBuilder<MediaStreamInfo> builder)
 14    {
 415        builder.HasKey(e => new { e.ItemId, e.StreamIndex });
 16
 17        // Covering index for the stream filters. ItemId comes second because it is what they project and
 18        // dedupe on; Language and IsExternal follow only to keep their predicates off the table.
 419        builder.HasIndex(e => new { e.StreamType, e.ItemId, e.Language, e.IsExternal });
 420    }
 21}