* fix episode fallback metadata processing, fix show fallback metadata year parsing * fix sort title for "a" and "an" * add and index studio metadata * minimize circular logging with search index errors * update plex movie sort titles as needed * properly escape search links * force refreshing all movie/show metadata
31 lines
910 B
C#
31 lines
910 B
C#
using ErsatzTV.Core.Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace ErsatzTV.Infrastructure.Data.Configurations
|
|
{
|
|
public class ShowMetadataConfiguration : IEntityTypeConfiguration<ShowMetadata>
|
|
{
|
|
public void Configure(EntityTypeBuilder<ShowMetadata> builder)
|
|
{
|
|
builder.ToTable("ShowMetadata");
|
|
|
|
builder.HasMany(sm => sm.Artwork)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(sm => sm.Genres)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(sm => sm.Tags)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(sm => sm.Studios)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
}
|
|
}
|
|
}
|