force scan local season folders to pick up multi-episode files (#242)

This commit is contained in:
Jason Dove
2021-06-04 11:42:03 -05:00
committed by GitHub
parent 49109ac121
commit ed0796ad58
2 changed files with 2913 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Migrations
{
public partial class Reset_LocalSeasonEtag : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(
@"UPDATE LibraryFolder SET Etag = NULL
WHERE LibraryPathId IN
(SELECT MI.LibraryPathId FROM MediaItem MI
INNER JOIN Season S on MI.Id = S.Id
INNER JOIN LibraryPath LP on MI.LibraryPathId = LP.Id
INNER JOIN Library L on LP.LibraryId = L.Id
INNER JOIN LocalLibrary LL on L.Id = LL.Id
WHERE L.MediaKind = 2)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}