< Summary - Jellyfin

Line coverage
97%
Covered lines: 502
Uncovered lines: 11
Coverable lines: 513
Total lines: 568
Line coverage: 97.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: 97.8% (489/500) Total lines: 5558/11/2026 - 12:17:00 AM Line coverage: 97.8% (502/513) Total lines: 568

Coverage delta

Coverage delta 1 -1

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/20210407110544_NullableCustomPrefValue.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2// <auto-generated />
 3using Microsoft.EntityFrameworkCore.Migrations;
 4
 5namespace Jellyfin.Server.Implementations.Migrations
 6{
 7    public partial class NullableCustomPrefValue : Migration
 8    {
 9        protected override void Up(MigrationBuilder migrationBuilder)
 10        {
 2711            migrationBuilder.AlterColumn<string>(
 2712                name: "Value",
 2713                schema: "jellyfin",
 2714                table: "CustomItemDisplayPreferences",
 2715                type: "TEXT",
 2716                nullable: true,
 2717                oldClrType: typeof(string),
 2718                oldType: "TEXT");
 2719        }
 20
 21        protected override void Down(MigrationBuilder migrationBuilder)
 22        {
 023            migrationBuilder.AlterColumn<string>(
 024                name: "Value",
 025                schema: "jellyfin",
 026                table: "CustomItemDisplayPreferences",
 027                type: "TEXT",
 028                nullable: false,
 029                defaultValue: "",
 030                oldClrType: typeof(string),
 031                oldType: "TEXT",
 032                oldNullable: true);
 033        }
 34    }
 35}

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/20210407110544_NullableCustomPrefValue.Designer.cs

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