mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* add remote stream metadata * use ifilesystem for last write time * clean up unused inheritance * optimize channel data query * revert removeartwork change * properly handle remote stream artwork in orphaned artwork checkpull/2685/head
19 changed files with 13982 additions and 91 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_RemoteStreamMetadata_ContentRatingPlot : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentRating", |
||||
table: "RemoteStreamMetadata", |
||||
type: "longtext", |
||||
nullable: true) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
name: "Plot", |
||||
table: "RemoteStreamMetadata", |
||||
type: "longtext", |
||||
nullable: true) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "ContentRating", |
||||
table: "RemoteStreamMetadata"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "Plot", |
||||
table: "RemoteStreamMetadata"); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_RemoteStreamMetadata_ContentRatingPlot : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<string>( |
||||
name: "ContentRating", |
||||
table: "RemoteStreamMetadata", |
||||
type: "TEXT", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
name: "Plot", |
||||
table: "RemoteStreamMetadata", |
||||
type: "TEXT", |
||||
nullable: true); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "ContentRating", |
||||
table: "RemoteStreamMetadata"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "Plot", |
||||
table: "RemoteStreamMetadata"); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
{{ ## |
||||
|
||||
Available values: |
||||
- programme_start |
||||
- programme_stop |
||||
- channel_id |
||||
- channel_id_legacy |
||||
- channel_number |
||||
- has_custom_title |
||||
- custom_title |
||||
- remote_stream_title |
||||
- remote_stream_has_plot |
||||
- remote_stream_plot |
||||
- remote_stream_has_year |
||||
- remote_stream_year |
||||
- remote_stream_has_artwork |
||||
- remote_stream_artwork_url |
||||
- remote_stream_has_content_rating |
||||
- remote_stream_content_rating |
||||
|
||||
The resulting XML will be minified by ErsatzTV - so feel free to keep things nicely formatted here. |
||||
|
||||
## }} |
||||
|
||||
<programme start="{{ programme_start }}" stop="{{ programme_stop }}" channel="{{ channel_id }}"> |
||||
{{ if has_custom_title }} |
||||
<title lang="en">{{ custom_title }}</title> |
||||
{{ else }} |
||||
<title lang="en">{{ remote_stream_title }}</title> |
||||
{{ if remote_stream_has_plot }} |
||||
<desc lang="en">{{ remote_stream_plot }}</desc> |
||||
{{ end }} |
||||
{{ if remote_stream_has_year }} |
||||
<date>{{ remote_stream_year }}</date> |
||||
{{ end }} |
||||
{{ if remote_stream_has_artwork }} |
||||
<icon src="{{ remote_stream_artwork_url }}" /> |
||||
{{ end }} |
||||
{{ end }} |
||||
{{ if remote_stream_has_content_rating }} |
||||
{{ for rating in remote_stream_content_rating | string.split '/' }} |
||||
{{ if rating | string.starts_with 'us:' }} |
||||
<rating system="MPAA"> |
||||
{{ else }} |
||||
<rating> |
||||
{{ end }} |
||||
<value>{{ rating | string.replace 'us:' '' }}</value> |
||||
</rating> |
||||
{{ end }} |
||||
{{ end }} |
||||
<previously-shown /> |
||||
</programme> |
||||
Loading…
Reference in new issue