< Summary - Jellyfin

Line coverage
98%
Covered lines: 433
Uncovered lines: 5
Coverable lines: 438
Total lines: 492
Line coverage: 98.8%
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: 98.8% (433/438) Total lines: 492

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: Up(...)100%11100%
File 1: Down(...)100%210%
File 2: BuildTargetModel(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2#pragma warning disable SA1601
 3
 4using Microsoft.EntityFrameworkCore.Migrations;
 5
 6namespace Jellyfin.Server.Implementations.Migrations
 7{
 8    public partial class AddMaxActiveSessions : Migration
 9    {
 10        protected override void Up(MigrationBuilder migrationBuilder)
 11        {
 2712            migrationBuilder.AddColumn<int>(
 2713                name: "MaxActiveSessions",
 2714                schema: "jellyfin",
 2715                table: "Users",
 2716                nullable: false,
 2717                defaultValue: 0);
 2718        }
 19
 20        protected override void Down(MigrationBuilder migrationBuilder)
 21        {
 022            migrationBuilder.DropColumn(
 023                name: "MaxActiveSessions",
 024                schema: "jellyfin",
 025                table: "Users");
 026        }
 27    }
 28}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20201004171403_AddMaxActiveSessions.Designer.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3// <auto-generated />
 4using System;
 5using Jellyfin.Database.Implementations;
 6using Microsoft.EntityFrameworkCore;
 7using Microsoft.EntityFrameworkCore.Infrastructure;
 8using Microsoft.EntityFrameworkCore.Migrations;
 9using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 10
 11namespace Jellyfin.Server.Implementations.Migrations
 12{
 13    [DbContext(typeof(JellyfinDbContext))]
 14    [Migration("20201004171403_AddMaxActiveSessions")]
 15    partial class AddMaxActiveSessions
 16    {
 17        protected override void BuildTargetModel(ModelBuilder modelBuilder)
 18        {
 19#pragma warning disable 612, 618
 2720            modelBuilder
 2721                .HasDefaultSchema("jellyfin")
 2722                .HasAnnotation("ProductVersion", "3.1.8");
 23
 2724            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 2725                {
 2726                    b.Property<int>("Id")
 2727                        .ValueGeneratedOnAdd()
 2728                        .HasColumnType("INTEGER");
 2729
 2730                    b.Property<int>("DayOfWeek")
 2731                        .HasColumnType("INTEGER");
 2732
 2733                    b.Property<double>("EndHour")
 2734                        .HasColumnType("REAL");
 2735
 2736                    b.Property<double>("StartHour")
 2737                        .HasColumnType("REAL");
 2738
 2739                    b.Property<Guid>("UserId")
 2740                        .HasColumnType("TEXT");
 2741
 2742                    b.HasKey("Id");
 2743
 2744                    b.HasIndex("UserId");
 2745
 2746                    b.ToTable("AccessSchedules");
 2747                });
 48
 2749            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2750                {
 2751                    b.Property<int>("Id")
 2752                        .ValueGeneratedOnAdd()
 2753                        .HasColumnType("INTEGER");
 2754
 2755                    b.Property<DateTime>("DateCreated")
 2756                        .HasColumnType("TEXT");
 2757
 2758                    b.Property<string>("ItemId")
 2759                        .HasColumnType("TEXT")
 2760                        .HasMaxLength(256);
 2761
 2762                    b.Property<int>("LogSeverity")
 2763                        .HasColumnType("INTEGER");
 2764
 2765                    b.Property<string>("Name")
 2766                        .IsRequired()
 2767                        .HasColumnType("TEXT")
 2768                        .HasMaxLength(512);
 2769
 2770                    b.Property<string>("Overview")
 2771                        .HasColumnType("TEXT")
 2772                        .HasMaxLength(512);
 2773
 2774                    b.Property<uint>("RowVersion")
 2775                        .IsConcurrencyToken()
 2776                        .HasColumnType("INTEGER");
 2777
 2778                    b.Property<string>("ShortOverview")
 2779                        .HasColumnType("TEXT")
 2780                        .HasMaxLength(512);
 2781
 2782                    b.Property<string>("Type")
 2783                        .IsRequired()
 2784                        .HasColumnType("TEXT")
 2785                        .HasMaxLength(256);
 2786
 2787                    b.Property<Guid>("UserId")
 2788                        .HasColumnType("TEXT");
 2789
 2790                    b.HasKey("Id");
 2791
 2792                    b.ToTable("ActivityLogs");
 2793                });
 94
 2795            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 2796                {
 2797                    b.Property<int>("Id")
 2798                        .ValueGeneratedOnAdd()
 2799                        .HasColumnType("INTEGER");
 27100
 27101                    b.Property<int>("ChromecastVersion")
 27102                        .HasColumnType("INTEGER");
 27103
 27104                    b.Property<string>("Client")
 27105                        .IsRequired()
 27106                        .HasColumnType("TEXT")
 27107                        .HasMaxLength(32);
 27108
 27109                    b.Property<string>("DashboardTheme")
 27110                        .HasColumnType("TEXT")
 27111                        .HasMaxLength(32);
 27112
 27113                    b.Property<bool>("EnableNextVideoInfoOverlay")
 27114                        .HasColumnType("INTEGER");
 27115
 27116                    b.Property<int?>("IndexBy")
 27117                        .HasColumnType("INTEGER");
 27118
 27119                    b.Property<int>("ScrollDirection")
 27120                        .HasColumnType("INTEGER");
 27121
 27122                    b.Property<bool>("ShowBackdrop")
 27123                        .HasColumnType("INTEGER");
 27124
 27125                    b.Property<bool>("ShowSidebar")
 27126                        .HasColumnType("INTEGER");
 27127
 27128                    b.Property<int>("SkipBackwardLength")
 27129                        .HasColumnType("INTEGER");
 27130
 27131                    b.Property<int>("SkipForwardLength")
 27132                        .HasColumnType("INTEGER");
 27133
 27134                    b.Property<string>("TvHome")
 27135                        .HasColumnType("TEXT")
 27136                        .HasMaxLength(32);
 27137
 27138                    b.Property<Guid>("UserId")
 27139                        .HasColumnType("TEXT");
 27140
 27141                    b.HasKey("Id");
 27142
 27143                    b.HasIndex("UserId");
 27144
 27145                    b.HasIndex("UserId", "Client")
 27146                        .IsUnique();
 27147
 27148                    b.ToTable("DisplayPreferences");
 27149                });
 150
 27151            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27152                {
 27153                    b.Property<int>("Id")
 27154                        .ValueGeneratedOnAdd()
 27155                        .HasColumnType("INTEGER");
 27156
 27157                    b.Property<int>("DisplayPreferencesId")
 27158                        .HasColumnType("INTEGER");
 27159
 27160                    b.Property<int>("Order")
 27161                        .HasColumnType("INTEGER");
 27162
 27163                    b.Property<int>("Type")
 27164                        .HasColumnType("INTEGER");
 27165
 27166                    b.HasKey("Id");
 27167
 27168                    b.HasIndex("DisplayPreferencesId");
 27169
 27170                    b.ToTable("HomeSection");
 27171                });
 172
 27173            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27174                {
 27175                    b.Property<int>("Id")
 27176                        .ValueGeneratedOnAdd()
 27177                        .HasColumnType("INTEGER");
 27178
 27179                    b.Property<DateTime>("LastModified")
 27180                        .HasColumnType("TEXT");
 27181
 27182                    b.Property<string>("Path")
 27183                        .IsRequired()
 27184                        .HasColumnType("TEXT")
 27185                        .HasMaxLength(512);
 27186
 27187                    b.Property<Guid?>("UserId")
 27188                        .HasColumnType("TEXT");
 27189
 27190                    b.HasKey("Id");
 27191
 27192                    b.HasIndex("UserId")
 27193                        .IsUnique();
 27194
 27195                    b.ToTable("ImageInfos");
 27196                });
 197
 27198            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27199                {
 27200                    b.Property<int>("Id")
 27201                        .ValueGeneratedOnAdd()
 27202                        .HasColumnType("INTEGER");
 27203
 27204                    b.Property<string>("Client")
 27205                        .IsRequired()
 27206                        .HasColumnType("TEXT")
 27207                        .HasMaxLength(32);
 27208
 27209                    b.Property<int?>("IndexBy")
 27210                        .HasColumnType("INTEGER");
 27211
 27212                    b.Property<Guid>("ItemId")
 27213                        .HasColumnType("TEXT");
 27214
 27215                    b.Property<bool>("RememberIndexing")
 27216                        .HasColumnType("INTEGER");
 27217
 27218                    b.Property<bool>("RememberSorting")
 27219                        .HasColumnType("INTEGER");
 27220
 27221                    b.Property<string>("SortBy")
 27222                        .IsRequired()
 27223                        .HasColumnType("TEXT")
 27224                        .HasMaxLength(64);
 27225
 27226                    b.Property<int>("SortOrder")
 27227                        .HasColumnType("INTEGER");
 27228
 27229                    b.Property<Guid>("UserId")
 27230                        .HasColumnType("TEXT");
 27231
 27232                    b.Property<int>("ViewType")
 27233                        .HasColumnType("INTEGER");
 27234
 27235                    b.HasKey("Id");
 27236
 27237                    b.HasIndex("UserId");
 27238
 27239                    b.ToTable("ItemDisplayPreferences");
 27240                });
 241
 27242            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27243                {
 27244                    b.Property<int>("Id")
 27245                        .ValueGeneratedOnAdd()
 27246                        .HasColumnType("INTEGER");
 27247
 27248                    b.Property<int>("Kind")
 27249                        .HasColumnType("INTEGER");
 27250
 27251                    b.Property<Guid?>("Permission_Permissions_Guid")
 27252                        .HasColumnType("TEXT");
 27253
 27254                    b.Property<uint>("RowVersion")
 27255                        .IsConcurrencyToken()
 27256                        .HasColumnType("INTEGER");
 27257
 27258                    b.Property<bool>("Value")
 27259                        .HasColumnType("INTEGER");
 27260
 27261                    b.HasKey("Id");
 27262
 27263                    b.HasIndex("Permission_Permissions_Guid");
 27264
 27265                    b.ToTable("Permissions");
 27266                });
 267
 27268            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27269                {
 27270                    b.Property<int>("Id")
 27271                        .ValueGeneratedOnAdd()
 27272                        .HasColumnType("INTEGER");
 27273
 27274                    b.Property<int>("Kind")
 27275                        .HasColumnType("INTEGER");
 27276
 27277                    b.Property<Guid?>("Preference_Preferences_Guid")
 27278                        .HasColumnType("TEXT");
 27279
 27280                    b.Property<uint>("RowVersion")
 27281                        .IsConcurrencyToken()
 27282                        .HasColumnType("INTEGER");
 27283
 27284                    b.Property<string>("Value")
 27285                        .IsRequired()
 27286                        .HasColumnType("TEXT")
 27287                        .HasMaxLength(65535);
 27288
 27289                    b.HasKey("Id");
 27290
 27291                    b.HasIndex("Preference_Preferences_Guid");
 27292
 27293                    b.ToTable("Preferences");
 27294                });
 295
 27296            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 27297                {
 27298                    b.Property<Guid>("Id")
 27299                        .ValueGeneratedOnAdd()
 27300                        .HasColumnType("TEXT");
 27301
 27302                    b.Property<string>("AudioLanguagePreference")
 27303                        .HasColumnType("TEXT")
 27304                        .HasMaxLength(255);
 27305
 27306                    b.Property<string>("AuthenticationProviderId")
 27307                        .IsRequired()
 27308                        .HasColumnType("TEXT")
 27309                        .HasMaxLength(255);
 27310
 27311                    b.Property<bool>("DisplayCollectionsView")
 27312                        .HasColumnType("INTEGER");
 27313
 27314                    b.Property<bool>("DisplayMissingEpisodes")
 27315                        .HasColumnType("INTEGER");
 27316
 27317                    b.Property<string>("EasyPassword")
 27318                        .HasColumnType("TEXT")
 27319                        .HasMaxLength(65535);
 27320
 27321                    b.Property<bool>("EnableAutoLogin")
 27322                        .HasColumnType("INTEGER");
 27323
 27324                    b.Property<bool>("EnableLocalPassword")
 27325                        .HasColumnType("INTEGER");
 27326
 27327                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 27328                        .HasColumnType("INTEGER");
 27329
 27330                    b.Property<bool>("EnableUserPreferenceAccess")
 27331                        .HasColumnType("INTEGER");
 27332
 27333                    b.Property<bool>("HidePlayedInLatest")
 27334                        .HasColumnType("INTEGER");
 27335
 27336                    b.Property<long>("InternalId")
 27337                        .HasColumnType("INTEGER");
 27338
 27339                    b.Property<int>("InvalidLoginAttemptCount")
 27340                        .HasColumnType("INTEGER");
 27341
 27342                    b.Property<DateTime?>("LastActivityDate")
 27343                        .HasColumnType("TEXT");
 27344
 27345                    b.Property<DateTime?>("LastLoginDate")
 27346                        .HasColumnType("TEXT");
 27347
 27348                    b.Property<int?>("LoginAttemptsBeforeLockout")
 27349                        .HasColumnType("INTEGER");
 27350
 27351                    b.Property<int?>("MaxActiveSessions")
 27352                        .HasColumnType("INTEGER");
 27353
 27354                    b.Property<int?>("MaxParentalAgeRating")
 27355                        .HasColumnType("INTEGER");
 27356
 27357                    b.Property<bool>("MustUpdatePassword")
 27358                        .HasColumnType("INTEGER");
 27359
 27360                    b.Property<string>("Password")
 27361                        .HasColumnType("TEXT")
 27362                        .HasMaxLength(65535);
 27363
 27364                    b.Property<string>("PasswordResetProviderId")
 27365                        .IsRequired()
 27366                        .HasColumnType("TEXT")
 27367                        .HasMaxLength(255);
 27368
 27369                    b.Property<bool>("PlayDefaultAudioTrack")
 27370                        .HasColumnType("INTEGER");
 27371
 27372                    b.Property<bool>("RememberAudioSelections")
 27373                        .HasColumnType("INTEGER");
 27374
 27375                    b.Property<bool>("RememberSubtitleSelections")
 27376                        .HasColumnType("INTEGER");
 27377
 27378                    b.Property<int?>("RemoteClientBitrateLimit")
 27379                        .HasColumnType("INTEGER");
 27380
 27381                    b.Property<uint>("RowVersion")
 27382                        .IsConcurrencyToken()
 27383                        .HasColumnType("INTEGER");
 27384
 27385                    b.Property<string>("SubtitleLanguagePreference")
 27386                        .HasColumnType("TEXT")
 27387                        .HasMaxLength(255);
 27388
 27389                    b.Property<int>("SubtitleMode")
 27390                        .HasColumnType("INTEGER");
 27391
 27392                    b.Property<int>("SyncPlayAccess")
 27393                        .HasColumnType("INTEGER");
 27394
 27395                    b.Property<string>("Username")
 27396                        .IsRequired()
 27397                        .HasColumnType("TEXT")
 27398                        .HasMaxLength(255);
 27399
 27400                    b.HasKey("Id");
 27401
 27402                    b.ToTable("Users");
 27403                });
 404
 27405            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 27406                {
 27407                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27408                        .WithMany("AccessSchedules")
 27409                        .HasForeignKey("UserId")
 27410                        .OnDelete(DeleteBehavior.Cascade)
 27411                        .IsRequired();
 27412                });
 413
 27414            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 27415                {
 27416                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27417                        .WithOne("DisplayPreferences")
 27418                        .HasForeignKey("Jellyfin.Data.Entities.DisplayPreferences", "UserId")
 27419                        .OnDelete(DeleteBehavior.Cascade)
 27420                        .IsRequired();
 27421                });
 422
 27423            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 27424                {
 27425                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 27426                        .WithMany("HomeSections")
 27427                        .HasForeignKey("DisplayPreferencesId")
 27428                        .OnDelete(DeleteBehavior.Cascade)
 27429                        .IsRequired();
 27430                });
 431
 27432            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 27433                {
 27434                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27435                        .WithOne("ProfileImage")
 27436                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId");
 27437                });
 438
 27439            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 27440                {
 27441                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27442                        .WithMany("ItemDisplayPreferences")
 27443                        .HasForeignKey("UserId")
 27444                        .OnDelete(DeleteBehavior.Cascade)
 27445                        .IsRequired();
 27446                });
 447
 27448            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 27449                {
 27450                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27451                        .WithMany("Permissions")
 27452                        .HasForeignKey("Permission_Permissions_Guid");
 27453                });
 454
 27455            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 27456                {
 27457                    b.HasOne("Jellyfin.Data.Entities.User", null)
 27458                        .WithMany("Preferences")
 27459                        .HasForeignKey("Preference_Preferences_Guid");
 27460                });
 461#pragma warning restore 612, 618
 27462        }
 463    }
 464}