< 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/6/2026 - 12:15:23 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        {
 2211            migrationBuilder.AlterColumn<string>(
 2212                name: "Value",
 2213                schema: "jellyfin",
 2214                table: "CustomItemDisplayPreferences",
 2215                type: "TEXT",
 2216                nullable: true,
 2217                oldClrType: typeof(string),
 2218                oldType: "TEXT");
 2219        }
 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
 2219            modelBuilder
 2220                .HasDefaultSchema("jellyfin")
 2221                .HasAnnotation("ProductVersion", "5.0.3");
 22
 2223            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 2224                {
 2225                    b.Property<int>("Id")
 2226                        .ValueGeneratedOnAdd()
 2227                        .HasColumnType("INTEGER");
 2228
 2229                    b.Property<int>("DayOfWeek")
 2230                        .HasColumnType("INTEGER");
 2231
 2232                    b.Property<double>("EndHour")
 2233                        .HasColumnType("REAL");
 2234
 2235                    b.Property<double>("StartHour")
 2236                        .HasColumnType("REAL");
 2237
 2238                    b.Property<Guid>("UserId")
 2239                        .HasColumnType("TEXT");
 2240
 2241                    b.HasKey("Id");
 2242
 2243                    b.HasIndex("UserId");
 2244
 2245                    b.ToTable("AccessSchedules");
 2246                });
 47
 2248            modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
 2249                {
 2250                    b.Property<int>("Id")
 2251                        .ValueGeneratedOnAdd()
 2252                        .HasColumnType("INTEGER");
 2253
 2254                    b.Property<DateTime>("DateCreated")
 2255                        .HasColumnType("TEXT");
 2256
 2257                    b.Property<string>("ItemId")
 2258                        .HasMaxLength(256)
 2259                        .HasColumnType("TEXT");
 2260
 2261                    b.Property<int>("LogSeverity")
 2262                        .HasColumnType("INTEGER");
 2263
 2264                    b.Property<string>("Name")
 2265                        .IsRequired()
 2266                        .HasMaxLength(512)
 2267                        .HasColumnType("TEXT");
 2268
 2269                    b.Property<string>("Overview")
 2270                        .HasMaxLength(512)
 2271                        .HasColumnType("TEXT");
 2272
 2273                    b.Property<uint>("RowVersion")
 2274                        .IsConcurrencyToken()
 2275                        .HasColumnType("INTEGER");
 2276
 2277                    b.Property<string>("ShortOverview")
 2278                        .HasMaxLength(512)
 2279                        .HasColumnType("TEXT");
 2280
 2281                    b.Property<string>("Type")
 2282                        .IsRequired()
 2283                        .HasMaxLength(256)
 2284                        .HasColumnType("TEXT");
 2285
 2286                    b.Property<Guid>("UserId")
 2287                        .HasColumnType("TEXT");
 2288
 2289                    b.HasKey("Id");
 2290
 2291                    b.ToTable("ActivityLogs");
 2292                });
 93
 2294            modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
 2295                {
 2296                    b.Property<int>("Id")
 2297                        .ValueGeneratedOnAdd()
 2298                        .HasColumnType("INTEGER");
 2299
 22100                    b.Property<string>("Client")
 22101                        .IsRequired()
 22102                        .HasMaxLength(32)
 22103                        .HasColumnType("TEXT");
 22104
 22105                    b.Property<Guid>("ItemId")
 22106                        .HasColumnType("TEXT");
 22107
 22108                    b.Property<string>("Key")
 22109                        .IsRequired()
 22110                        .HasColumnType("TEXT");
 22111
 22112                    b.Property<Guid>("UserId")
 22113                        .HasColumnType("TEXT");
 22114
 22115                    b.Property<string>("Value")
 22116                        .HasColumnType("TEXT");
 22117
 22118                    b.HasKey("Id");
 22119
 22120                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 22121                        .IsUnique();
 22122
 22123                    b.ToTable("CustomItemDisplayPreferences");
 22124                });
 125
 22126            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22127                {
 22128                    b.Property<int>("Id")
 22129                        .ValueGeneratedOnAdd()
 22130                        .HasColumnType("INTEGER");
 22131
 22132                    b.Property<int>("ChromecastVersion")
 22133                        .HasColumnType("INTEGER");
 22134
 22135                    b.Property<string>("Client")
 22136                        .IsRequired()
 22137                        .HasMaxLength(32)
 22138                        .HasColumnType("TEXT");
 22139
 22140                    b.Property<string>("DashboardTheme")
 22141                        .HasMaxLength(32)
 22142                        .HasColumnType("TEXT");
 22143
 22144                    b.Property<bool>("EnableNextVideoInfoOverlay")
 22145                        .HasColumnType("INTEGER");
 22146
 22147                    b.Property<int?>("IndexBy")
 22148                        .HasColumnType("INTEGER");
 22149
 22150                    b.Property<Guid>("ItemId")
 22151                        .HasColumnType("TEXT");
 22152
 22153                    b.Property<int>("ScrollDirection")
 22154                        .HasColumnType("INTEGER");
 22155
 22156                    b.Property<bool>("ShowBackdrop")
 22157                        .HasColumnType("INTEGER");
 22158
 22159                    b.Property<bool>("ShowSidebar")
 22160                        .HasColumnType("INTEGER");
 22161
 22162                    b.Property<int>("SkipBackwardLength")
 22163                        .HasColumnType("INTEGER");
 22164
 22165                    b.Property<int>("SkipForwardLength")
 22166                        .HasColumnType("INTEGER");
 22167
 22168                    b.Property<string>("TvHome")
 22169                        .HasMaxLength(32)
 22170                        .HasColumnType("TEXT");
 22171
 22172                    b.Property<Guid>("UserId")
 22173                        .HasColumnType("TEXT");
 22174
 22175                    b.HasKey("Id");
 22176
 22177                    b.HasIndex("UserId", "ItemId", "Client")
 22178                        .IsUnique();
 22179
 22180                    b.ToTable("DisplayPreferences");
 22181                });
 182
 22183            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22184                {
 22185                    b.Property<int>("Id")
 22186                        .ValueGeneratedOnAdd()
 22187                        .HasColumnType("INTEGER");
 22188
 22189                    b.Property<int>("DisplayPreferencesId")
 22190                        .HasColumnType("INTEGER");
 22191
 22192                    b.Property<int>("Order")
 22193                        .HasColumnType("INTEGER");
 22194
 22195                    b.Property<int>("Type")
 22196                        .HasColumnType("INTEGER");
 22197
 22198                    b.HasKey("Id");
 22199
 22200                    b.HasIndex("DisplayPreferencesId");
 22201
 22202                    b.ToTable("HomeSection");
 22203                });
 204
 22205            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22206                {
 22207                    b.Property<int>("Id")
 22208                        .ValueGeneratedOnAdd()
 22209                        .HasColumnType("INTEGER");
 22210
 22211                    b.Property<DateTime>("LastModified")
 22212                        .HasColumnType("TEXT");
 22213
 22214                    b.Property<string>("Path")
 22215                        .IsRequired()
 22216                        .HasMaxLength(512)
 22217                        .HasColumnType("TEXT");
 22218
 22219                    b.Property<Guid?>("UserId")
 22220                        .HasColumnType("TEXT");
 22221
 22222                    b.HasKey("Id");
 22223
 22224                    b.HasIndex("UserId")
 22225                        .IsUnique();
 22226
 22227                    b.ToTable("ImageInfos");
 22228                });
 229
 22230            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22231                {
 22232                    b.Property<int>("Id")
 22233                        .ValueGeneratedOnAdd()
 22234                        .HasColumnType("INTEGER");
 22235
 22236                    b.Property<string>("Client")
 22237                        .IsRequired()
 22238                        .HasMaxLength(32)
 22239                        .HasColumnType("TEXT");
 22240
 22241                    b.Property<int?>("IndexBy")
 22242                        .HasColumnType("INTEGER");
 22243
 22244                    b.Property<Guid>("ItemId")
 22245                        .HasColumnType("TEXT");
 22246
 22247                    b.Property<bool>("RememberIndexing")
 22248                        .HasColumnType("INTEGER");
 22249
 22250                    b.Property<bool>("RememberSorting")
 22251                        .HasColumnType("INTEGER");
 22252
 22253                    b.Property<string>("SortBy")
 22254                        .IsRequired()
 22255                        .HasMaxLength(64)
 22256                        .HasColumnType("TEXT");
 22257
 22258                    b.Property<int>("SortOrder")
 22259                        .HasColumnType("INTEGER");
 22260
 22261                    b.Property<Guid>("UserId")
 22262                        .HasColumnType("TEXT");
 22263
 22264                    b.Property<int>("ViewType")
 22265                        .HasColumnType("INTEGER");
 22266
 22267                    b.HasKey("Id");
 22268
 22269                    b.HasIndex("UserId");
 22270
 22271                    b.ToTable("ItemDisplayPreferences");
 22272                });
 273
 22274            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22275                {
 22276                    b.Property<int>("Id")
 22277                        .ValueGeneratedOnAdd()
 22278                        .HasColumnType("INTEGER");
 22279
 22280                    b.Property<int>("Kind")
 22281                        .HasColumnType("INTEGER");
 22282
 22283                    b.Property<Guid?>("Permission_Permissions_Guid")
 22284                        .HasColumnType("TEXT");
 22285
 22286                    b.Property<uint>("RowVersion")
 22287                        .IsConcurrencyToken()
 22288                        .HasColumnType("INTEGER");
 22289
 22290                    b.Property<Guid?>("UserId")
 22291                        .HasColumnType("TEXT");
 22292
 22293                    b.Property<bool>("Value")
 22294                        .HasColumnType("INTEGER");
 22295
 22296                    b.HasKey("Id");
 22297
 22298                    b.HasIndex("UserId", "Kind")
 22299                        .IsUnique()
 22300                        .HasFilter("[UserId] IS NOT NULL");
 22301
 22302                    b.ToTable("Permissions");
 22303                });
 304
 22305            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22306                {
 22307                    b.Property<int>("Id")
 22308                        .ValueGeneratedOnAdd()
 22309                        .HasColumnType("INTEGER");
 22310
 22311                    b.Property<int>("Kind")
 22312                        .HasColumnType("INTEGER");
 22313
 22314                    b.Property<Guid?>("Preference_Preferences_Guid")
 22315                        .HasColumnType("TEXT");
 22316
 22317                    b.Property<uint>("RowVersion")
 22318                        .IsConcurrencyToken()
 22319                        .HasColumnType("INTEGER");
 22320
 22321                    b.Property<Guid?>("UserId")
 22322                        .HasColumnType("TEXT");
 22323
 22324                    b.Property<string>("Value")
 22325                        .IsRequired()
 22326                        .HasMaxLength(65535)
 22327                        .HasColumnType("TEXT");
 22328
 22329                    b.HasKey("Id");
 22330
 22331                    b.HasIndex("UserId", "Kind")
 22332                        .IsUnique()
 22333                        .HasFilter("[UserId] IS NOT NULL");
 22334
 22335                    b.ToTable("Preferences");
 22336                });
 337
 22338            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22339                {
 22340                    b.Property<Guid>("Id")
 22341                        .ValueGeneratedOnAdd()
 22342                        .HasColumnType("TEXT");
 22343
 22344                    b.Property<string>("AudioLanguagePreference")
 22345                        .HasMaxLength(255)
 22346                        .HasColumnType("TEXT");
 22347
 22348                    b.Property<string>("AuthenticationProviderId")
 22349                        .IsRequired()
 22350                        .HasMaxLength(255)
 22351                        .HasColumnType("TEXT");
 22352
 22353                    b.Property<bool>("DisplayCollectionsView")
 22354                        .HasColumnType("INTEGER");
 22355
 22356                    b.Property<bool>("DisplayMissingEpisodes")
 22357                        .HasColumnType("INTEGER");
 22358
 22359                    b.Property<string>("EasyPassword")
 22360                        .HasMaxLength(65535)
 22361                        .HasColumnType("TEXT");
 22362
 22363                    b.Property<bool>("EnableAutoLogin")
 22364                        .HasColumnType("INTEGER");
 22365
 22366                    b.Property<bool>("EnableLocalPassword")
 22367                        .HasColumnType("INTEGER");
 22368
 22369                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 22370                        .HasColumnType("INTEGER");
 22371
 22372                    b.Property<bool>("EnableUserPreferenceAccess")
 22373                        .HasColumnType("INTEGER");
 22374
 22375                    b.Property<bool>("HidePlayedInLatest")
 22376                        .HasColumnType("INTEGER");
 22377
 22378                    b.Property<long>("InternalId")
 22379                        .HasColumnType("INTEGER");
 22380
 22381                    b.Property<int>("InvalidLoginAttemptCount")
 22382                        .HasColumnType("INTEGER");
 22383
 22384                    b.Property<DateTime?>("LastActivityDate")
 22385                        .HasColumnType("TEXT");
 22386
 22387                    b.Property<DateTime?>("LastLoginDate")
 22388                        .HasColumnType("TEXT");
 22389
 22390                    b.Property<int?>("LoginAttemptsBeforeLockout")
 22391                        .HasColumnType("INTEGER");
 22392
 22393                    b.Property<int>("MaxActiveSessions")
 22394                        .HasColumnType("INTEGER");
 22395
 22396                    b.Property<int?>("MaxParentalAgeRating")
 22397                        .HasColumnType("INTEGER");
 22398
 22399                    b.Property<bool>("MustUpdatePassword")
 22400                        .HasColumnType("INTEGER");
 22401
 22402                    b.Property<string>("Password")
 22403                        .HasMaxLength(65535)
 22404                        .HasColumnType("TEXT");
 22405
 22406                    b.Property<string>("PasswordResetProviderId")
 22407                        .IsRequired()
 22408                        .HasMaxLength(255)
 22409                        .HasColumnType("TEXT");
 22410
 22411                    b.Property<bool>("PlayDefaultAudioTrack")
 22412                        .HasColumnType("INTEGER");
 22413
 22414                    b.Property<bool>("RememberAudioSelections")
 22415                        .HasColumnType("INTEGER");
 22416
 22417                    b.Property<bool>("RememberSubtitleSelections")
 22418                        .HasColumnType("INTEGER");
 22419
 22420                    b.Property<int?>("RemoteClientBitrateLimit")
 22421                        .HasColumnType("INTEGER");
 22422
 22423                    b.Property<uint>("RowVersion")
 22424                        .IsConcurrencyToken()
 22425                        .HasColumnType("INTEGER");
 22426
 22427                    b.Property<string>("SubtitleLanguagePreference")
 22428                        .HasMaxLength(255)
 22429                        .HasColumnType("TEXT");
 22430
 22431                    b.Property<int>("SubtitleMode")
 22432                        .HasColumnType("INTEGER");
 22433
 22434                    b.Property<int>("SyncPlayAccess")
 22435                        .HasColumnType("INTEGER");
 22436
 22437                    b.Property<string>("Username")
 22438                        .IsRequired()
 22439                        .HasMaxLength(255)
 22440                        .HasColumnType("TEXT")
 22441                        .UseCollation("NOCASE");
 22442
 22443                    b.HasKey("Id");
 22444
 22445                    b.HasIndex("Username")
 22446                        .IsUnique();
 22447
 22448                    b.ToTable("Users");
 22449                });
 450
 22451            modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
 22452                {
 22453                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22454                        .WithMany("AccessSchedules")
 22455                        .HasForeignKey("UserId")
 22456                        .OnDelete(DeleteBehavior.Cascade)
 22457                        .IsRequired();
 22458                });
 459
 22460            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22461                {
 22462                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22463                        .WithMany("DisplayPreferences")
 22464                        .HasForeignKey("UserId")
 22465                        .OnDelete(DeleteBehavior.Cascade)
 22466                        .IsRequired();
 22467                });
 468
 22469            modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
 22470                {
 22471                    b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
 22472                        .WithMany("HomeSections")
 22473                        .HasForeignKey("DisplayPreferencesId")
 22474                        .OnDelete(DeleteBehavior.Cascade)
 22475                        .IsRequired();
 22476                });
 477
 22478            modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
 22479                {
 22480                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22481                        .WithOne("ProfileImage")
 22482                        .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
 22483                        .OnDelete(DeleteBehavior.Cascade);
 22484                });
 485
 22486            modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
 22487                {
 22488                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22489                        .WithMany("ItemDisplayPreferences")
 22490                        .HasForeignKey("UserId")
 22491                        .OnDelete(DeleteBehavior.Cascade)
 22492                        .IsRequired();
 22493                });
 494
 22495            modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
 22496                {
 22497                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22498                        .WithMany("Permissions")
 22499                        .HasForeignKey("UserId")
 22500                        .OnDelete(DeleteBehavior.Cascade);
 22501                });
 502
 22503            modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
 22504                {
 22505                    b.HasOne("Jellyfin.Data.Entities.User", null)
 22506                        .WithMany("Preferences")
 22507                        .HasForeignKey("UserId")
 22508                        .OnDelete(DeleteBehavior.Cascade);
 22509                });
 510
 22511            modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
 22512                {
 22513                    b.Navigation("HomeSections");
 22514                });
 515
 22516            modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
 22517                {
 22518                    b.Navigation("AccessSchedules");
 22519
 22520                    b.Navigation("DisplayPreferences");
 22521
 22522                    b.Navigation("ItemDisplayPreferences");
 22523
 22524                    b.Navigation("Permissions");
 22525
 22526                    b.Navigation("Preferences");
 22527
 22528                    b.Navigation("ProfileImage");
 22529                });
 530#pragma warning restore 612, 618
 22531        }
 532    }
 533}