mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* Use chapters in duration filler * add new option, migrations, and update filler preset editor * Revert "Use chapters in duration filler" This reverts commit d87a8a240a78c1cbca7b311125f8d3a84645d296. * scaffold splitting filler by chapter * implement chapters as filler * update changelog * re-add migrations * Add duration for ChapterMediaItem --------- Co-authored-by: Jason Dove <1695733+jasongdove@users.noreply.github.com>pull/2248/head
22 changed files with 12422 additions and 40 deletions
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
namespace ErsatzTV.Core.Domain; |
||||
|
||||
public class ChapterMediaItem : MediaItem |
||||
{ |
||||
public ChapterMediaItem(int id, MediaItem mediaItem, ChapterMediaVersion chapterMediaVersion) |
||||
{ |
||||
Id = id; |
||||
MediaItemId = mediaItem.Id; |
||||
MediaVersion = chapterMediaVersion; |
||||
} |
||||
|
||||
public int MediaItemId { get; } |
||||
public ChapterMediaVersion MediaVersion { get; } |
||||
} |
||||
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
namespace ErsatzTV.Core.Domain; |
||||
|
||||
public class ChapterMediaVersion : MediaVersion |
||||
{ |
||||
public ChapterMediaVersion(MediaChapter chapter) |
||||
{ |
||||
InPoint = chapter.StartTime; |
||||
Duration = chapter.EndTime - chapter.StartTime; |
||||
Title = chapter.Title; |
||||
} |
||||
|
||||
public TimeSpan InPoint { get; } |
||||
public string Title { get; } |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class FillerPreset_UseChaptersAsMediaItems : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<bool>( |
||||
name: "UseChaptersAsMediaItems", |
||||
table: "FillerPreset", |
||||
type: "tinyint(1)", |
||||
nullable: false, |
||||
defaultValue: false); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "UseChaptersAsMediaItems", |
||||
table: "FillerPreset"); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class FillerPreset_UseChaptersAsMediaItems : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<bool>( |
||||
name: "UseChaptersAsMediaItems", |
||||
table: "FillerPreset", |
||||
type: "INTEGER", |
||||
nullable: false, |
||||
defaultValue: false); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "UseChaptersAsMediaItems", |
||||
table: "FillerPreset"); |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue