More torrent and omdb

This commit is contained in:
Elias Jansson
2025-08-20 00:39:19 +02:00
parent a97f31e405
commit f53c87c50c
12 changed files with 1703 additions and 9 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,125 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Aberwyn.Migrations
{
public partial class AddMovieMetadataToTorrentItem : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Metadata_Actors",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_Director",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_Genre",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_ImdbID",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_ImdbRating",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_Plot",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_Poster",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_Runtime",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_Title",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Metadata_Year",
table: "TorrentItems",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Metadata_Actors",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_Director",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_Genre",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_ImdbID",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_ImdbRating",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_Plot",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_Poster",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_Runtime",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_Title",
table: "TorrentItems");
migrationBuilder.DropColumn(
name: "Metadata_Year",
table: "TorrentItems");
}
}
}

View File

@@ -1143,6 +1143,55 @@ namespace Aberwyn.Migrations
.IsRequired();
});
modelBuilder.Entity("TorrentItem", b =>
{
b.OwnsOne("MovieMetadata", "Metadata", b1 =>
{
b1.Property<int>("TorrentItemId")
.HasColumnType("int");
b1.Property<string>("Actors")
.HasColumnType("longtext");
b1.Property<string>("Director")
.HasColumnType("longtext");
b1.Property<string>("Genre")
.HasColumnType("longtext");
b1.Property<string>("ImdbID")
.HasColumnType("longtext");
b1.Property<string>("ImdbRating")
.HasColumnType("longtext");
b1.Property<string>("Plot")
.HasColumnType("longtext");
b1.Property<string>("Poster")
.HasColumnType("longtext");
b1.Property<string>("Runtime")
.HasColumnType("longtext");
b1.Property<string>("Title")
.IsRequired()
.HasColumnType("longtext");
b1.Property<string>("Year")
.HasColumnType("longtext");
b1.HasKey("TorrentItemId");
b1.ToTable("TorrentItems");
b1.WithOwner()
.HasForeignKey("TorrentItemId");
});
b.Navigation("Metadata");
});
modelBuilder.Entity("Aberwyn.Models.ApplicationUser", b =>
{
b.Navigation("Preferences")