* fix plex library synchronization * add basic plex movie synchronization * proxy plex movie thumbnails (posters) * add plex path replacements * use transcoded plex artwork * remove unsynchronized plex movies on save; queue plex library scan on save * log plex path replacements * prefer buttons instead of menus * lock plex libraries before sync * add movie to collection from paged view * fix plex import memory use; quick add seasons/shows * quick add episode to collection * add favicon * add search page * disable plex for now
25 lines
843 B
C#
25 lines
843 B
C#
using ErsatzTV.Core.Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace ErsatzTV.Infrastructure.Data.Configurations
|
|
{
|
|
public class PlexMediaSourceConfiguration : IEntityTypeConfiguration<PlexMediaSource>
|
|
{
|
|
public void Configure(EntityTypeBuilder<PlexMediaSource> builder)
|
|
{
|
|
builder.ToTable("PlexMediaSource");
|
|
|
|
builder.HasMany(s => s.Connections)
|
|
.WithOne(c => c.PlexMediaSource)
|
|
.HasForeignKey(c => c.PlexMediaSourceId)
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(s => s.PathReplacements)
|
|
.WithOne(r => r.PlexMediaSource)
|
|
.HasForeignKey(r => r.PlexMediaSourceId)
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
}
|
|
}
|
|
}
|