mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* add generate playlist option; add system playlists * fix official lists; sync items to playlistpull/2172/head
38 changed files with 23963 additions and 51 deletions
@ -1,3 +1,3 @@ |
|||||||
namespace ErsatzTV.Application.MediaCollections; |
namespace ErsatzTV.Application.MediaCollections; |
||||||
|
|
||||||
public record PlaylistGroupViewModel(int Id, string Name, int PlaylistCount); |
public record PlaylistGroupViewModel(int Id, string Name, int PlaylistCount, bool IsSystem); |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
namespace ErsatzTV.Application.MediaCollections; |
namespace ErsatzTV.Application.MediaCollections; |
||||||
|
|
||||||
public record PlaylistViewModel(int Id, int PlaylistGroupId, string Name); |
public record PlaylistViewModel(int Id, int PlaylistGroupId, string Name, bool IsSystem); |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
namespace ErsatzTV.Application.Tree; |
namespace ErsatzTV.Application.Tree; |
||||||
|
|
||||||
public record TreeGroupViewModel(int Id, string Name, List<TreeItemViewModel> Children); |
public record TreeGroupViewModel(int Id, string Name, List<TreeItemViewModel> Children, bool IsSystem = false); |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
namespace ErsatzTV.Application.Tree; |
namespace ErsatzTV.Application.Tree; |
||||||
|
|
||||||
public record TreeItemViewModel(int Id, string Name); |
public record TreeItemViewModel(int Id, string Name, bool IsSystem = false); |
||||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,60 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_TraktListPlaylist : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<bool>( |
||||||
|
name: "GeneratePlaylist", |
||||||
|
table: "TraktList", |
||||||
|
type: "tinyint(1)", |
||||||
|
nullable: false, |
||||||
|
defaultValue: false); |
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>( |
||||||
|
name: "PlaylistId", |
||||||
|
table: "TraktList", |
||||||
|
type: "int", |
||||||
|
nullable: true); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_TraktList_PlaylistId", |
||||||
|
table: "TraktList", |
||||||
|
column: "PlaylistId"); |
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey( |
||||||
|
name: "FK_TraktList_Playlist_PlaylistId", |
||||||
|
table: "TraktList", |
||||||
|
column: "PlaylistId", |
||||||
|
principalTable: "Playlist", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.SetNull); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropForeignKey( |
||||||
|
name: "FK_TraktList_Playlist_PlaylistId", |
||||||
|
table: "TraktList"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_TraktList_PlaylistId", |
||||||
|
table: "TraktList"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "GeneratePlaylist", |
||||||
|
table: "TraktList"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "PlaylistId", |
||||||
|
table: "TraktList"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_PlaylistIsSystem : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<bool>( |
||||||
|
name: "IsSystem", |
||||||
|
table: "PlaylistGroup", |
||||||
|
type: "tinyint(1)", |
||||||
|
nullable: false, |
||||||
|
defaultValue: false); |
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>( |
||||||
|
name: "IsSystem", |
||||||
|
table: "Playlist", |
||||||
|
type: "tinyint(1)", |
||||||
|
nullable: false, |
||||||
|
defaultValue: false); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "IsSystem", |
||||||
|
table: "PlaylistGroup"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "IsSystem", |
||||||
|
table: "Playlist"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,60 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_TraktListPlaylist : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<bool>( |
||||||
|
name: "GeneratePlaylist", |
||||||
|
table: "TraktList", |
||||||
|
type: "INTEGER", |
||||||
|
nullable: false, |
||||||
|
defaultValue: false); |
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>( |
||||||
|
name: "PlaylistId", |
||||||
|
table: "TraktList", |
||||||
|
type: "INTEGER", |
||||||
|
nullable: true); |
||||||
|
|
||||||
|
migrationBuilder.CreateIndex( |
||||||
|
name: "IX_TraktList_PlaylistId", |
||||||
|
table: "TraktList", |
||||||
|
column: "PlaylistId"); |
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey( |
||||||
|
name: "FK_TraktList_Playlist_PlaylistId", |
||||||
|
table: "TraktList", |
||||||
|
column: "PlaylistId", |
||||||
|
principalTable: "Playlist", |
||||||
|
principalColumn: "Id", |
||||||
|
onDelete: ReferentialAction.SetNull); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropForeignKey( |
||||||
|
name: "FK_TraktList_Playlist_PlaylistId", |
||||||
|
table: "TraktList"); |
||||||
|
|
||||||
|
migrationBuilder.DropIndex( |
||||||
|
name: "IX_TraktList_PlaylistId", |
||||||
|
table: "TraktList"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "GeneratePlaylist", |
||||||
|
table: "TraktList"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "PlaylistId", |
||||||
|
table: "TraktList"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,40 @@ |
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||||
|
|
||||||
|
#nullable disable |
||||||
|
|
||||||
|
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Add_PlaylistIsSystem : Migration |
||||||
|
{ |
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.AddColumn<bool>( |
||||||
|
name: "IsSystem", |
||||||
|
table: "PlaylistGroup", |
||||||
|
type: "INTEGER", |
||||||
|
nullable: false, |
||||||
|
defaultValue: false); |
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>( |
||||||
|
name: "IsSystem", |
||||||
|
table: "Playlist", |
||||||
|
type: "INTEGER", |
||||||
|
nullable: false, |
||||||
|
defaultValue: false); |
||||||
|
} |
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||||
|
{ |
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "IsSystem", |
||||||
|
table: "PlaylistGroup"); |
||||||
|
|
||||||
|
migrationBuilder.DropColumn( |
||||||
|
name: "IsSystem", |
||||||
|
table: "Playlist"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue