mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* add music video credits template system * fix search index bug * cleanup csprojpull/983/head
28 changed files with 4576 additions and 32 deletions
@ -0,0 +1,3 @@ |
|||||||
|
namespace ErsatzTV.Application.Templates; |
||||||
|
|
||||||
|
public record GetMusicVideoCreditTemplates : IRequest<List<string>>; |
||||||
@ -0,0 +1,20 @@ |
|||||||
|
using ErsatzTV.Core; |
||||||
|
using ErsatzTV.Core.Interfaces.Metadata; |
||||||
|
|
||||||
|
namespace ErsatzTV.Application.Templates; |
||||||
|
|
||||||
|
public class GetMusicVideoCreditTemplatesHandler : IRequestHandler<GetMusicVideoCreditTemplates, List<string>> |
||||||
|
{ |
||||||
|
private readonly ILocalFileSystem _localFileSystem; |
||||||
|
|
||||||
|
public GetMusicVideoCreditTemplatesHandler(ILocalFileSystem localFileSystem) |
||||||
|
{ |
||||||
|
_localFileSystem = localFileSystem; |
||||||
|
} |
||||||
|
|
||||||
|
public Task<List<string>> Handle(GetMusicVideoCreditTemplates request, CancellationToken cancellationToken) => |
||||||
|
_localFileSystem.ListFiles(FileSystemLayout.MusicVideoCreditsTemplatesFolder) |
||||||
|
.Map(Path.GetFileNameWithoutExtension) |
||||||
|
.ToList() |
||||||
|
.AsTask(); |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Migrations |
||||||
|
{ |
||||||
|
public partial class Add_ChannelMusicVideoCreditsTemplate : Migration |
||||||
|
{ |
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<string>( |
||||||
|
name: "MusicVideoCreditsTemplate", |
||||||
|
table: "Channel", |
||||||
|
type: "TEXT", |
||||||
|
nullable: true); |
||||||
|
} |
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "MusicVideoCreditsTemplate", |
||||||
|
table: "Channel"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
[Script Info] |
||||||
|
ScriptType: v4.00+ |
||||||
|
WrapStyle: 0 |
||||||
|
ScaledBorderAndShadow: yes |
||||||
|
YCbCr Matrix: None |
||||||
|
PlayResX: {{ resolution.width }} |
||||||
|
PlayResY: {{ resolution.height }} |
||||||
|
[V4+ Styles] |
||||||
|
Format: Name, Fontname, Fontsize, PrimaryColour, OutlineColour, BorderStyle, Outline, Shadow, Alignment, Encoding |
||||||
|
Style: Default,OPTIKabel-Heavy,{{ resolution.height // 20.0 }},&HFFFFFF,&H444444,1,1,3,0,1 |
||||||
|
[Events] |
||||||
|
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text |
||||||
|
Dialogue: 0,00:00:09.00,00:00:16.00,Default,,{{ resolution.width * 0.03 | math.round }},{{ resolution.width * 0.03 | math.round }},{{ resolution.height * 0.05 | math.round }},,{fad(1200, 1200)}{{ if all_artists | array.size == 0 }}{{ artist }}{{ else }}{{ all_artists | array.join " / " }}{{ end }}\N"{{ title }}"{{ if album }}\N{{ album }}{{ end }} |
||||||
Loading…
Reference in new issue