mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* add new columns * store local content ratings * display and search content ratings * add content_rating to search docs * sync content rating from jellyfin, emby, plex * force sync content rating for all libraries * code cleanuppull/219/head
34 changed files with 2939 additions and 13 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations |
||||
{ |
||||
public partial class Add_MovieMetadataShowMetadataContentRating : Migration |
||||
{ |
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
// local and plex
|
||||
migrationBuilder.Sql("UPDATE MovieMetadata SET DateUpdated = '0001-01-01 00:00:00'"); |
||||
migrationBuilder.Sql("UPDATE ShowMetadata SET DateUpdated = '0001-01-01 00:00:00'"); |
||||
migrationBuilder.Sql( |
||||
@"UPDATE LibraryFolder SET Etag = NULL WHERE LibraryPathId IN
|
||||
(SELECT LibraryPathId FROM LibraryPath LP |
||||
INNER JOIN Library L on LP.LibraryId = L.Id |
||||
WHERE L.MediaKind = 1)");
|
||||
|
||||
// emby
|
||||
migrationBuilder.Sql("UPDATE EmbyMovie SET Etag = NULL"); |
||||
migrationBuilder.Sql("UPDATE EmbyShow SET Etag = NULL"); |
||||
|
||||
// jellyfin
|
||||
migrationBuilder.Sql("UPDATE JellyfinMovie SET Etag = NULL"); |
||||
migrationBuilder.Sql("UPDATE JellyfinShow SET Etag = NULL"); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
"ContentRating", |
||||
"ShowMetadata", |
||||
"TEXT", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
"ContentRating", |
||||
"MovieMetadata", |
||||
"TEXT", |
||||
nullable: true); |
||||
} |
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
"ContentRating", |
||||
"ShowMetadata"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
"ContentRating", |
||||
"MovieMetadata"); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue