exclude strm files from jellyfin scanners (#249)

* exclude strm files from jellyfin scanners

* update changelog
This commit is contained in:
Jason Dove
2021-06-07 07:41:59 -05:00
committed by GitHub
parent 3bc3faa7c4
commit e20f9be702
5 changed files with 2925 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace ErsatzTV.Infrastructure.Migrations
{
public partial class Delete_JellyfinStrmFiles : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(
@"DELETE FROM MediaItem WHERE Id IN
(SELECT MI.Id FROM MediaItem MI
INNER JOIN MediaVersion MV on MV.MovieId = MI.Id
INNER JOIN MediaFile MF on MV.Id = MF.MediaVersionId
WHERE MF.Path LIKE '%.strm')");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}