rework media layout (#22)
* replace media items tables with card grids * style cleanup * add basic paging * sort and page in the db * optimize sql for movies * support movie posters * resize movie posters and store in cache with channel logos * fix bug preventing folders with more than 50 chars as local media sources * support tv posters
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Migrations
|
||||
{
|
||||
public partial class MetadataSortTitle : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
"Metadata_SortTitle",
|
||||
"MediaItems",
|
||||
"TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.Sql(
|
||||
@"UPDATE MediaItems
|
||||
SET Metadata_SortTitle = Metadata_Title");
|
||||
|
||||
migrationBuilder.Sql(
|
||||
@"UPDATE MediaItems
|
||||
SET Metadata_SortTitle = substr(Metadata_Title, 5)
|
||||
WHERE Metadata_Title LIKE 'the %'");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder) =>
|
||||
migrationBuilder.DropColumn(
|
||||
"Metadata_SortTitle",
|
||||
"MediaItems");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user