Browse Source

clean up old columns

pull/31/head
Jason Dove 6 years ago
parent
commit
48eee8c666
  1. 15
      ErsatzTV.Core/Domain/MediaItem/MediaItem.cs
  2. 18
      ErsatzTV.Core/Domain/MediaItem/MediaItemStatistics.cs
  3. 4
      ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs
  4. 5
      ErsatzTV.Infrastructure/Data/Repositories/MovieRepository.cs
  5. 5
      ErsatzTV.Infrastructure/Data/Repositories/TelevisionRepository.cs
  6. 1455
      ErsatzTV.Infrastructure/Migrations/20210228114241_CleanUp_MediaItemStatisticsAndPath.Designer.cs
  7. 189
      ErsatzTV.Infrastructure/Migrations/20210228114241_CleanUp_MediaItemStatisticsAndPath.cs
  8. 1455
      ErsatzTV.Infrastructure/Migrations/20210228114929_Update_MediaVersionDateAdded.Designer.cs
  9. 19
      ErsatzTV.Infrastructure/Migrations/20210228114929_Update_MediaVersionDateAdded.cs
  10. 439
      ErsatzTV.Infrastructure/Migrations/TvContextModelSnapshot.cs
  11. 2
      ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs
  12. 2
      ErsatzTV/ErsatzTV.csproj

15
ErsatzTV.Core/Domain/MediaItem/MediaItem.cs

@ -1,26 +1,13 @@ @@ -1,26 +1,13 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
namespace ErsatzTV.Core.Domain
{
public class MediaItem
{
public int Id { get; set; }
// public MediaItemStatistics Statistics { get; set; }
public DateTime? LastWriteTime { get; set; }
public int LibraryPathId { get; set; }
public LibraryPath LibraryPath { get; set; }
// temporary fields to help migrations...
public int TelevisionShowId { get; set; }
public int TelevisionSeasonId { get; set; }
public int TelevisionEpisodeId { get; set; }
public List<Collection> Collections { get; set; }
public List<CollectionItem> CollectionItems { get; set; }
// public string Path { get; set; }
}
}

18
ErsatzTV.Core/Domain/MediaItem/MediaItemStatistics.cs

@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
using System;
using ErsatzTV.Core.Interfaces.FFmpeg;
namespace ErsatzTV.Core.Domain
{
public record MediaItemStatistics : IDisplaySize
{
public DateTime? LastWriteTime { get; set; }
public TimeSpan Duration { get; set; }
public string SampleAspectRatio { get; set; }
public string DisplayAspectRatio { get; set; }
public string VideoCodec { get; set; }
public string AudioCodec { get; set; }
public VideoScanKind VideoScanType { get; set; }
public int Width { get; set; }
public int Height { get; set; }
}
}

4
ErsatzTV.Infrastructure/Data/Repositories/MediaCollectionRepository.cs

@ -156,6 +156,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -156,6 +156,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
return await _dbContext.Movies
.Include(m => m.MovieMetadata)
.Include(m => m.MediaVersions)
.Filter(m => ids.Contains(m.Id))
.ToListAsync();
}
@ -172,6 +173,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -172,6 +173,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
return await _dbContext.Episodes
.Include(e => e.EpisodeMetadata)
.Include(e => e.MediaVersions)
.Filter(e => ids.Contains(e.Id))
.ToListAsync();
}
@ -187,6 +189,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -187,6 +189,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
return await _dbContext.Episodes
.Include(e => e.EpisodeMetadata)
.Include(e => e.MediaVersions)
.Filter(e => ids.Contains(e.Id))
.ToListAsync();
}
@ -201,6 +204,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -201,6 +204,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
return await _dbContext.Episodes
.Include(e => e.EpisodeMetadata)
.Include(e => e.MediaVersions)
.Filter(e => ids.Contains(e.Id))
.ToListAsync();
}

5
ErsatzTV.Infrastructure/Data/Repositories/MovieRepository.cs

@ -47,6 +47,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -47,6 +47,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
.ThenInclude(mm => mm.Artwork)
.Include(i => i.LibraryPath)
.Include(i => i.MediaVersions)
.ThenInclude(mv => mv.MediaFiles)
.OrderBy(i => i.MediaVersions.First().MediaFiles.First().Path)
.SingleOrDefaultAsync(i => i.MediaVersions.First().MediaFiles.First().Path == path);
@ -55,9 +56,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -55,9 +56,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
async () => await AddMovie(libraryPath.Id, path));
}
public async Task<Either<BaseError, PlexMovie>> GetOrAdd(
PlexLibrary library,
PlexMovie item)
public async Task<Either<BaseError, PlexMovie>> GetOrAdd(PlexLibrary library, PlexMovie item)
{
Option<PlexMovie> maybeExisting = await _dbContext.PlexMovieMediaItems
.Include(i => i.MovieMetadata)

5
ErsatzTV.Infrastructure/Data/Repositories/TelevisionRepository.cs

@ -220,6 +220,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -220,6 +220,7 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
.Include(i => i.EpisodeMetadata)
.ThenInclude(em => em.Artwork)
.Include(i => i.MediaVersions)
.ThenInclude(mv => mv.MediaFiles)
.OrderBy(i => i.MediaVersions.First().MediaFiles.First().Path)
.SingleOrDefaultAsync(i => i.MediaVersions.First().MediaFiles.First().Path == path);
@ -251,6 +252,8 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -251,6 +252,8 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
return await _dbContext.Episodes
.Include(e => e.EpisodeMetadata)
.Include(e => e.MediaVersions)
.Include(e => e.Season)
.Filter(e => ids.Contains(e.Id))
.ToListAsync();
}
@ -258,6 +261,8 @@ namespace ErsatzTV.Infrastructure.Data.Repositories @@ -258,6 +261,8 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
public Task<List<Episode>> GetSeasonItems(int seasonId) =>
_dbContext.Episodes
.Include(e => e.EpisodeMetadata)
.Include(e => e.MediaVersions)
.Include(e => e.Season)
.Filter(e => e.SeasonId == seasonId)
.ToListAsync();

1455
ErsatzTV.Infrastructure/Migrations/20210228114241_CleanUp_MediaItemStatisticsAndPath.Designer.cs generated

File diff suppressed because it is too large Load Diff

189
ErsatzTV.Infrastructure/Migrations/20210228114241_CleanUp_MediaItemStatisticsAndPath.cs

@ -0,0 +1,189 @@ @@ -0,0 +1,189 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Migrations
{
public partial class CleanUp_MediaItemStatisticsAndPath : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
"IX_MediaItem_Path",
"MediaItem");
migrationBuilder.DropColumn(
"LastWriteTime",
"MediaItem");
migrationBuilder.DropColumn(
"Path",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_AudioCodec",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_DisplayAspectRatio",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_Duration",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_Height",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_LastWriteTime",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_SampleAspectRatio",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_VideoCodec",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_VideoScanType",
"MediaItem");
migrationBuilder.DropColumn(
"Statistics_Width",
"MediaItem");
migrationBuilder.DropColumn(
"TelevisionEpisodeId",
"MediaItem");
migrationBuilder.DropColumn(
"TelevisionSeasonId",
"MediaItem");
migrationBuilder.DropColumn(
"TelevisionShowId",
"MediaItem");
migrationBuilder.AddColumn<DateTime>(
"DateAdded",
"MediaVersion",
"TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<DateTime>(
"DateUpdated",
"MediaVersion",
"TEXT",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
"DateAdded",
"MediaVersion");
migrationBuilder.DropColumn(
"DateUpdated",
"MediaVersion");
migrationBuilder.AddColumn<DateTime>(
"LastWriteTime",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
"Path",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
"Statistics_AudioCodec",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
"Statistics_DisplayAspectRatio",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<TimeSpan>(
"Statistics_Duration",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<int>(
"Statistics_Height",
"MediaItem",
"INTEGER",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
"Statistics_LastWriteTime",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
"Statistics_SampleAspectRatio",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<string>(
"Statistics_VideoCodec",
"MediaItem",
"TEXT",
nullable: true);
migrationBuilder.AddColumn<int>(
"Statistics_VideoScanType",
"MediaItem",
"INTEGER",
nullable: true);
migrationBuilder.AddColumn<int>(
"Statistics_Width",
"MediaItem",
"INTEGER",
nullable: true);
migrationBuilder.AddColumn<int>(
"TelevisionEpisodeId",
"MediaItem",
"INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
"TelevisionSeasonId",
"MediaItem",
"INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
"TelevisionShowId",
"MediaItem",
"INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateIndex(
"IX_MediaItem_Path",
"MediaItem",
"Path",
unique: true);
}
}
}

1455
ErsatzTV.Infrastructure/Migrations/20210228114929_Update_MediaVersionDateAdded.Designer.cs generated

File diff suppressed because it is too large Load Diff

19
ErsatzTV.Infrastructure/Migrations/20210228114929_Update_MediaVersionDateAdded.cs

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Migrations
{
public partial class Update_MediaVersionDateAdded : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
var now = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss.FFFFFFF");
migrationBuilder.Sql($@"UPDATE MediaVersion SET DateAdded = '{now}'");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

439
ErsatzTV.Infrastructure/Migrations/TvContextModelSnapshot.cs

@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
// <auto-generated />
using System;
using ErsatzTV.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ErsatzTV.Infrastructure.Migrations
{
[DbContext(typeof(TvContext))]
internal class TvContextModelSnapshot : ModelSnapshot
partial class TvContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@ -16,9 +16,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -16,9 +16,7 @@ namespace ErsatzTV.Infrastructure.Migrations
modelBuilder
.HasAnnotation("ProductVersion", "5.0.3");
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Artwork",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -61,9 +59,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -61,9 +59,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Artwork");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Channel",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -97,9 +93,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -97,9 +93,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Channel");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Collection",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -113,9 +107,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -113,9 +107,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Collection");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.CollectionItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
{
b.Property<int>("CollectionId")
.HasColumnType("INTEGER");
@ -130,9 +122,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -130,9 +122,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("CollectionItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ConfigElement",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ConfigElement", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -152,9 +142,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -152,9 +142,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ConfigElement");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.EpisodeMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -203,9 +191,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -203,9 +191,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("EpisodeMetadata");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.FFmpegProfile",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -269,9 +255,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -269,9 +255,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("FFmpegProfile");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Library",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -296,9 +280,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -296,9 +280,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Library");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LibraryPath",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -317,9 +299,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -317,9 +299,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("LibraryPath");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaFile",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -338,45 +318,23 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -338,45 +318,23 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaFile");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime?>("LastWriteTime")
.HasColumnType("TEXT");
b.Property<int>("LibraryPathId")
.HasColumnType("INTEGER");
b.Property<string>("Path")
.HasColumnType("TEXT");
b.Property<int>("TelevisionEpisodeId")
.HasColumnType("INTEGER");
b.Property<int>("TelevisionSeasonId")
.HasColumnType("INTEGER");
b.Property<int>("TelevisionShowId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("LibraryPathId");
b.HasIndex("Path")
.IsUnique();
b.ToTable("MediaItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaSource",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -387,9 +345,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -387,9 +345,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaSource");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaVersion",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -398,6 +354,12 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -398,6 +354,12 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Property<string>("AudioCodec")
.HasColumnType("TEXT");
b.Property<DateTime>("DateAdded")
.HasColumnType("TEXT");
b.Property<DateTime>("DateUpdated")
.HasColumnType("TEXT");
b.Property<string>("DisplayAspectRatio")
.HasColumnType("TEXT");
@ -437,9 +399,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -437,9 +399,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MediaVersion");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MovieMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -488,9 +448,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -488,9 +448,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("MovieMetadata");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -514,9 +472,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -514,9 +472,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Playout");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -543,9 +499,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -543,9 +499,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlayoutItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -579,9 +533,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -579,9 +533,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlayoutProgramScheduleAnchor");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexConnection",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -603,9 +555,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -603,9 +555,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexConnection");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaItemPart",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaItemPart", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -631,9 +581,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -631,9 +581,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMediaItemPart");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramSchedule",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramSchedule", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -653,9 +601,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -653,9 +601,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramSchedule");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -690,9 +636,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -690,9 +636,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Resolution",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Resolution", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -712,9 +656,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -712,9 +656,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Resolution");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.SeasonMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -757,9 +699,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -757,9 +699,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("SeasonMetadata");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ShowMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@ -808,18 +748,14 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -808,18 +748,14 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ShowMetadata");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalLibrary",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalLibrary", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
b.ToTable("LocalLibrary");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexLibrary",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexLibrary", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Library");
@ -832,9 +768,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -832,9 +768,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexLibrary");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
@ -849,18 +783,14 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -849,18 +783,14 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Episode");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Movie");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
@ -875,27 +805,21 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -875,27 +805,21 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("Season");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaItem");
b.ToTable("Show");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalMediaSource",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalMediaSource", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
b.ToTable("LocalMediaSource");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaSource",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.MediaSource");
@ -911,9 +835,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -911,9 +835,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMediaSource");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemDuration",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
@ -926,18 +848,14 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -926,18 +848,14 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleDurationItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemFlood",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleFloodItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemMultiple",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemMultiple", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
@ -947,18 +865,14 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -947,18 +865,14 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("ProgramScheduleMultipleItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemOne",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemOne", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.ProgramScheduleItem");
b.ToTable("ProgramScheduleOneItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMovie",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMovie", b =>
{
b.HasBaseType("ErsatzTV.Core.Domain.Movie");
@ -973,9 +887,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -973,9 +887,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.ToTable("PlexMovie");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Artwork",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Artwork", b =>
{
b.HasOne("ErsatzTV.Core.Domain.EpisodeMetadata", null)
.WithMany("Artwork")
@ -998,9 +910,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -998,9 +910,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Channel",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
{
b.HasOne("ErsatzTV.Core.Domain.FFmpegProfile", "FFmpegProfile")
.WithMany()
@ -1011,9 +921,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1011,9 +921,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("FFmpegProfile");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.CollectionItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.CollectionItem", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany("CollectionItems")
@ -1032,9 +940,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1032,9 +940,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaItem");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.EpisodeMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", "Episode")
.WithMany("EpisodeMetadata")
@ -1045,9 +951,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1045,9 +951,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Episode");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.FFmpegProfile",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.FFmpegProfile", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Resolution", "Resolution")
.WithMany()
@ -1058,9 +962,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1058,9 +962,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Resolution");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Library",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", "MediaSource")
.WithMany("Libraries")
@ -1071,9 +973,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1071,9 +973,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaSource");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LibraryPath",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", "Library")
.WithMany("Paths")
@ -1084,9 +984,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1084,9 +984,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Library");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaFile",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaFile", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaVersion", "MediaVersion")
.WithMany("MediaFiles")
@ -1097,9 +995,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1097,9 +995,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("MediaVersion");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
{
b.HasOne("ErsatzTV.Core.Domain.LibraryPath", "LibraryPath")
.WithMany("MediaItems")
@ -1107,57 +1003,10 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1107,57 +1003,10 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne(
"ErsatzTV.Core.Domain.MediaItemStatistics",
"Statistics",
b1 =>
{
b1.Property<int>("MediaItemId")
.HasColumnType("INTEGER");
b1.Property<string>("AudioCodec")
.HasColumnType("TEXT");
b1.Property<string>("DisplayAspectRatio")
.HasColumnType("TEXT");
b1.Property<TimeSpan>("Duration")
.HasColumnType("TEXT");
b1.Property<int>("Height")
.HasColumnType("INTEGER");
b1.Property<DateTime?>("LastWriteTime")
.HasColumnType("TEXT");
b1.Property<string>("SampleAspectRatio")
.HasColumnType("TEXT");
b1.Property<string>("VideoCodec")
.HasColumnType("TEXT");
b1.Property<int>("VideoScanType")
.HasColumnType("INTEGER");
b1.Property<int>("Width")
.HasColumnType("INTEGER");
b1.HasKey("MediaItemId");
b1.ToTable("MediaItem");
b1.WithOwner()
.HasForeignKey("MediaItemId");
});
b.Navigation("LibraryPath");
b.Navigation("Statistics");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MediaVersion",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Episode", null)
.WithMany("MediaVersions")
@ -1170,9 +1019,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1170,9 +1019,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.MovieMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Movie", "Movie")
.WithMany("MovieMetadata")
@ -1183,9 +1030,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1183,9 +1030,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Movie");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Channel", "Channel")
.WithMany("Playouts")
@ -1199,10 +1044,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1199,10 +1044,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne(
"ErsatzTV.Core.Domain.PlayoutAnchor",
"Anchor",
b1 =>
b.OwnsOne("ErsatzTV.Core.Domain.PlayoutAnchor", "Anchor", b1 =>
{
b1.Property<int>("PlayoutId")
.HasColumnType("INTEGER");
@ -1238,9 +1080,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1238,9 +1080,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutItem", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", "MediaItem")
.WithMany()
@ -1259,9 +1099,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1259,9 +1099,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Playout");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlayoutProgramScheduleAnchor", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
@ -1283,10 +1121,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1283,10 +1121,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsOne(
"ErsatzTV.Core.Domain.CollectionEnumeratorState",
"EnumeratorState",
b1 =>
b.OwnsOne("ErsatzTV.Core.Domain.CollectionEnumeratorState", "EnumeratorState", b1 =>
{
b1.Property<int>("PlayoutProgramScheduleAnchorId")
.HasColumnType("INTEGER");
@ -1316,9 +1151,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1316,9 +1151,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexConnection",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexConnection", b =>
{
b.HasOne("ErsatzTV.Core.Domain.PlexMediaSource", "PlexMediaSource")
.WithMany("Connections")
@ -1329,9 +1162,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1329,9 +1162,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("PlexMediaSource");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItem",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItem", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Collection", "Collection")
.WithMany()
@ -1354,9 +1185,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1354,9 +1185,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("ProgramSchedule");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.SeasonMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Season", "Season")
.WithMany("SeasonMetadata")
@ -1367,9 +1196,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1367,9 +1196,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Season");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ShowMetadata",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Show", "Show")
.WithMany("ShowMetadata")
@ -1380,9 +1207,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1380,9 +1207,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Show");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalLibrary",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalLibrary", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", null)
.WithOne()
@ -1391,9 +1216,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1391,9 +1216,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexLibrary",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexLibrary", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Library", null)
.WithOne()
@ -1402,9 +1225,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1402,9 +1225,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1421,9 +1242,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1421,9 +1242,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Season");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1432,9 +1251,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1432,9 +1251,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1451,9 +1268,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1451,9 +1268,7 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Show");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaItem", null)
.WithOne()
@ -1462,9 +1277,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1462,9 +1277,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.LocalMediaSource",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.LocalMediaSource", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", null)
.WithOne()
@ -1473,9 +1286,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1473,9 +1286,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMediaSource",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
{
b.HasOne("ErsatzTV.Core.Domain.MediaSource", null)
.WithOne()
@ -1484,9 +1295,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1484,9 +1295,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemDuration",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemDuration", b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1495,9 +1304,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1495,9 +1304,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemFlood",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemFlood", b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1506,9 +1313,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1506,9 +1313,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemMultiple",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemMultiple", b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1517,9 +1322,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1517,9 +1322,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramScheduleItemOne",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramScheduleItemOne", b =>
{
b.HasOne("ErsatzTV.Core.Domain.ProgramScheduleItem", null)
.WithOne()
@ -1528,9 +1331,7 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1528,9 +1331,7 @@ namespace ErsatzTV.Infrastructure.Migrations
.IsRequired();
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.PlexMovie",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMovie", b =>
{
b.HasOne("ErsatzTV.Core.Domain.Movie", null)
.WithOne()
@ -1545,83 +1346,107 @@ namespace ErsatzTV.Infrastructure.Migrations @@ -1545,83 +1346,107 @@ namespace ErsatzTV.Infrastructure.Migrations
b.Navigation("Part");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b => { b.Navigation("Playouts"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Channel", b =>
{
b.Navigation("Playouts");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b => { b.Navigation("CollectionItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Collection", b =>
{
b.Navigation("CollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.EpisodeMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b => { b.Navigation("Paths"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.Library", b =>
{
b.Navigation("Paths");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b => { b.Navigation("MediaItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.LibraryPath", b =>
{
b.Navigation("MediaItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b => { b.Navigation("CollectionItems"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaItem", b =>
{
b.Navigation("CollectionItems");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b => { b.Navigation("Libraries"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaSource", b =>
{
b.Navigation("Libraries");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b => { b.Navigation("MediaFiles"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MediaVersion", b =>
{
b.Navigation("MediaFiles");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.MovieMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Playout",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Playout", b =>
{
b.Navigation("Items");
b.Navigation("ProgramScheduleAnchors");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.ProgramSchedule",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.ProgramSchedule", b =>
{
b.Navigation("Items");
b.Navigation("Playouts");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.SeasonMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b => { b.Navigation("Artwork"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.ShowMetadata", b =>
{
b.Navigation("Artwork");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Episode",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Episode", b =>
{
b.Navigation("EpisodeMetadata");
b.Navigation("MediaVersions");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Movie",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Movie", b =>
{
b.Navigation("MediaVersions");
b.Navigation("MovieMetadata");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Season",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Season", b =>
{
b.Navigation("Episodes");
b.Navigation("SeasonMetadata");
});
modelBuilder.Entity(
"ErsatzTV.Core.Domain.Show",
b =>
modelBuilder.Entity("ErsatzTV.Core.Domain.Show", b =>
{
b.Navigation("Seasons");
b.Navigation("ShowMetadata");
});
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b => { b.Navigation("Connections"); });
modelBuilder.Entity("ErsatzTV.Core.Domain.PlexMediaSource", b =>
{
b.Navigation("Connections");
});
#pragma warning restore 612, 618
}
}

2
ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs

@ -139,7 +139,7 @@ namespace ErsatzTV.Infrastructure.Plex @@ -139,7 +139,7 @@ namespace ErsatzTV.Infrastructure.Plex
var movie = new PlexMovie
{
Key = response.Key,
LastWriteTime = lastWriteTime,
// DateUpdated = lastWriteTime,
MovieMetadata = new List<MovieMetadata> { metadata },
// TODO: versions
// Statistics = new MediaItemStatistics

2
ErsatzTV/ErsatzTV.csproj

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MudBlazor" Version="5.0.1-dev.2" />
<PackageReference Include="MudBlazor" Version="5.0.2" />
<PackageReference Include="Refit.HttpClientFactory" Version="6.0.1" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />

Loading…
Cancel
Save