diff --git a/API/Migrations/20250313191146_dev-130325-6.Designer.cs b/API/Migrations/20250313191146_dev-130325-6.Designer.cs
new file mode 100644
index 0000000..1fa6aee
--- /dev/null
+++ b/API/Migrations/20250313191146_dev-130325-6.Designer.cs
@@ -0,0 +1,768 @@
+//
+using System;
+using System.Collections.Generic;
+using API.Schema;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace API.Migrations
+{
+ [DbContext(typeof(PgsqlContext))]
+ [Migration("20250313191146_dev-130325-6")]
+ partial class dev1303256
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.3")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "hstore");
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("API.Schema.Author", b =>
+ {
+ b.Property("AuthorId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("AuthorName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.HasKey("AuthorId");
+
+ b.ToTable("Authors");
+ });
+
+ modelBuilder.Entity("API.Schema.Chapter", b =>
+ {
+ b.Property("ChapterId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("ArchiveFileName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("ChapterNumber")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Downloaded")
+ .HasColumnType("boolean");
+
+ b.Property("ParentMangaId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("Title")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("VolumeNumber")
+ .HasColumnType("integer");
+
+ b.HasKey("ChapterId");
+
+ b.HasIndex("ParentMangaId");
+
+ b.ToTable("Chapters");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.Job", b =>
+ {
+ b.Property("JobId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.PrimitiveCollection("DependsOnJobsIds")
+ .HasMaxLength(64)
+ .HasColumnType("text[]");
+
+ b.Property("Enabled")
+ .HasColumnType("boolean");
+
+ b.Property("JobId1")
+ .HasColumnType("character varying(64)");
+
+ b.Property("JobType")
+ .HasColumnType("smallint");
+
+ b.Property("LastExecution")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ParentJobId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("RecurrenceMs")
+ .HasColumnType("numeric(20,0)");
+
+ b.Property("state")
+ .HasColumnType("smallint");
+
+ b.HasKey("JobId");
+
+ b.HasIndex("JobId1");
+
+ b.HasIndex("ParentJobId");
+
+ b.ToTable("Jobs");
+
+ b.HasDiscriminator("JobType");
+
+ b.UseTphMappingStrategy();
+ });
+
+ modelBuilder.Entity("API.Schema.LibraryConnectors.LibraryConnector", b =>
+ {
+ b.Property("LibraryConnectorId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("Auth")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("BaseUrl")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("LibraryType")
+ .HasColumnType("smallint");
+
+ b.HasKey("LibraryConnectorId");
+
+ b.ToTable("LibraryConnectors");
+
+ b.HasDiscriminator("LibraryType");
+
+ b.UseTphMappingStrategy();
+ });
+
+ modelBuilder.Entity("API.Schema.Link", b =>
+ {
+ b.Property("LinkId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("LinkProvider")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("LinkUrl")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("MangaId")
+ .HasColumnType("character varying(64)");
+
+ b.HasKey("LinkId");
+
+ b.HasIndex("MangaId");
+
+ b.ToTable("Link");
+ });
+
+ modelBuilder.Entity("API.Schema.Manga", b =>
+ {
+ b.Property("MangaId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("CoverFileNameInCache")
+ .HasColumnType("text");
+
+ b.Property("CoverUrl")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("FolderName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("IdOnConnectorSite")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("IgnoreChapterBefore")
+ .HasColumnType("real");
+
+ b.Property("MangaConnectorId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("OriginalLanguage")
+ .IsRequired()
+ .HasMaxLength(8)
+ .HasColumnType("character varying(8)");
+
+ b.Property("ReleaseStatus")
+ .HasColumnType("smallint");
+
+ b.Property("WebsiteUrl")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("Year")
+ .HasColumnType("bigint");
+
+ b.HasKey("MangaId");
+
+ b.HasIndex("MangaConnectorId");
+
+ b.ToTable("Manga");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaAltTitle", b =>
+ {
+ b.Property("AltTitleId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("Language")
+ .IsRequired()
+ .HasMaxLength(8)
+ .HasColumnType("character varying(8)");
+
+ b.Property("MangaId")
+ .HasColumnType("character varying(64)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("AltTitleId");
+
+ b.HasIndex("MangaId");
+
+ b.ToTable("AltTitles");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.MangaConnector", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(32)
+ .HasColumnType("character varying(32)");
+
+ b.PrimitiveCollection("BaseUris")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("text[]");
+
+ b.Property("Enabled")
+ .HasColumnType("boolean");
+
+ b.Property("IconUrl")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.PrimitiveCollection("SupportedLanguages")
+ .IsRequired()
+ .HasMaxLength(8)
+ .HasColumnType("text[]");
+
+ b.HasKey("Name");
+
+ b.ToTable("MangaConnectors");
+
+ b.HasDiscriminator("Name").HasValue("MangaConnector");
+
+ b.UseTphMappingStrategy();
+ });
+
+ modelBuilder.Entity("API.Schema.MangaTag", b =>
+ {
+ b.Property("Tag")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.HasKey("Tag");
+
+ b.ToTable("Tags");
+ });
+
+ modelBuilder.Entity("API.Schema.Notification", b =>
+ {
+ b.Property("NotificationId")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("Date")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Message")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("Urgency")
+ .HasColumnType("smallint");
+
+ b.HasKey("NotificationId");
+
+ b.ToTable("Notifications");
+ });
+
+ modelBuilder.Entity("API.Schema.NotificationConnectors.NotificationConnector", b =>
+ {
+ b.Property("Name")
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.Property("Body")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)");
+
+ b.Property>("Headers")
+ .IsRequired()
+ .HasColumnType("hstore");
+
+ b.Property("HttpMethod")
+ .IsRequired()
+ .HasMaxLength(8)
+ .HasColumnType("character varying(8)");
+
+ b.Property("Url")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Name");
+
+ b.ToTable("NotificationConnectors");
+ });
+
+ modelBuilder.Entity("AuthorManga", b =>
+ {
+ b.Property("AuthorsAuthorId")
+ .HasColumnType("character varying(64)");
+
+ b.Property("MangaId")
+ .HasColumnType("character varying(64)");
+
+ b.HasKey("AuthorsAuthorId", "MangaId");
+
+ b.HasIndex("MangaId");
+
+ b.ToTable("AuthorManga");
+ });
+
+ modelBuilder.Entity("MangaMangaTag", b =>
+ {
+ b.Property("MangaId")
+ .HasColumnType("character varying(64)");
+
+ b.Property("MangaTagsTag")
+ .HasColumnType("character varying(64)");
+
+ b.HasKey("MangaId", "MangaTagsTag");
+
+ b.HasIndex("MangaTagsTag");
+
+ b.ToTable("MangaMangaTag");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.DownloadAvailableChaptersJob", b =>
+ {
+ b.HasBaseType("API.Schema.Jobs.Job");
+
+ b.Property("MangaId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.HasIndex("MangaId");
+
+ b.ToTable("Jobs", t =>
+ {
+ t.Property("MangaId")
+ .HasColumnName("DownloadAvailableChaptersJob_MangaId");
+ });
+
+ b.HasDiscriminator().HasValue((byte)1);
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.DownloadMangaCoverJob", b =>
+ {
+ b.HasBaseType("API.Schema.Jobs.Job");
+
+ b.Property("MangaId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.HasIndex("MangaId");
+
+ b.HasDiscriminator().HasValue((byte)4);
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.DownloadSingleChapterJob", b =>
+ {
+ b.HasBaseType("API.Schema.Jobs.Job");
+
+ b.Property("ChapterId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.HasIndex("ChapterId");
+
+ b.HasDiscriminator().HasValue((byte)0);
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.MoveFileOrFolderJob", b =>
+ {
+ b.HasBaseType("API.Schema.Jobs.Job");
+
+ b.Property("FromLocation")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("ToLocation")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasDiscriminator().HasValue((byte)3);
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.RetrieveChaptersJob", b =>
+ {
+ b.HasBaseType("API.Schema.Jobs.Job");
+
+ b.Property("MangaId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.HasIndex("MangaId");
+
+ b.ToTable("Jobs", t =>
+ {
+ t.Property("MangaId")
+ .HasColumnName("RetrieveChaptersJob_MangaId");
+ });
+
+ b.HasDiscriminator().HasValue((byte)5);
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.UpdateFilesDownloadedJob", b =>
+ {
+ b.HasBaseType("API.Schema.Jobs.Job");
+
+ b.Property("MangaId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.HasIndex("MangaId");
+
+ b.ToTable("Jobs", t =>
+ {
+ t.Property("MangaId")
+ .HasColumnName("UpdateFilesDownloadedJob_MangaId");
+ });
+
+ b.HasDiscriminator().HasValue((byte)6);
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.UpdateMetadataJob", b =>
+ {
+ b.HasBaseType("API.Schema.Jobs.Job");
+
+ b.Property("MangaId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("character varying(64)");
+
+ b.HasIndex("MangaId");
+
+ b.ToTable("Jobs", t =>
+ {
+ t.Property("MangaId")
+ .HasColumnName("UpdateMetadataJob_MangaId");
+ });
+
+ b.HasDiscriminator().HasValue((byte)2);
+ });
+
+ modelBuilder.Entity("API.Schema.LibraryConnectors.Kavita", b =>
+ {
+ b.HasBaseType("API.Schema.LibraryConnectors.LibraryConnector");
+
+ b.HasDiscriminator().HasValue((byte)1);
+ });
+
+ modelBuilder.Entity("API.Schema.LibraryConnectors.Komga", b =>
+ {
+ b.HasBaseType("API.Schema.LibraryConnectors.LibraryConnector");
+
+ b.HasDiscriminator().HasValue((byte)0);
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.AsuraToon", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("AsuraToon");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.Bato", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("Bato");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.MangaDex", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("MangaDex");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.MangaHere", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("MangaHere");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.MangaKatana", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("MangaKatana");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.Manganato", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("Manganato");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.Mangaworld", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("Mangaworld");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.ManhuaPlus", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("ManhuaPlus");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaConnectors.Weebcentral", b =>
+ {
+ b.HasBaseType("API.Schema.MangaConnectors.MangaConnector");
+
+ b.HasDiscriminator().HasValue("Weebcentral");
+ });
+
+ modelBuilder.Entity("API.Schema.Chapter", b =>
+ {
+ b.HasOne("API.Schema.Manga", "ParentManga")
+ .WithMany()
+ .HasForeignKey("ParentMangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("ParentManga");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.Job", b =>
+ {
+ b.HasOne("API.Schema.Jobs.Job", null)
+ .WithMany("DependsOnJobs")
+ .HasForeignKey("JobId1");
+
+ b.HasOne("API.Schema.Jobs.Job", "ParentJob")
+ .WithMany()
+ .HasForeignKey("ParentJobId");
+
+ b.Navigation("ParentJob");
+ });
+
+ modelBuilder.Entity("API.Schema.Link", b =>
+ {
+ b.HasOne("API.Schema.Manga", null)
+ .WithMany("Links")
+ .HasForeignKey("MangaId");
+ });
+
+ modelBuilder.Entity("API.Schema.Manga", b =>
+ {
+ b.HasOne("API.Schema.MangaConnectors.MangaConnector", "MangaConnector")
+ .WithMany()
+ .HasForeignKey("MangaConnectorId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("MangaConnector");
+ });
+
+ modelBuilder.Entity("API.Schema.MangaAltTitle", b =>
+ {
+ b.HasOne("API.Schema.Manga", null)
+ .WithMany("AltTitles")
+ .HasForeignKey("MangaId");
+ });
+
+ modelBuilder.Entity("AuthorManga", b =>
+ {
+ b.HasOne("API.Schema.Author", null)
+ .WithMany()
+ .HasForeignKey("AuthorsAuthorId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Schema.Manga", null)
+ .WithMany()
+ .HasForeignKey("MangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("MangaMangaTag", b =>
+ {
+ b.HasOne("API.Schema.Manga", null)
+ .WithMany()
+ .HasForeignKey("MangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("API.Schema.MangaTag", null)
+ .WithMany()
+ .HasForeignKey("MangaTagsTag")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.DownloadAvailableChaptersJob", b =>
+ {
+ b.HasOne("API.Schema.Manga", "Manga")
+ .WithMany()
+ .HasForeignKey("MangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Manga");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.DownloadMangaCoverJob", b =>
+ {
+ b.HasOne("API.Schema.Manga", "Manga")
+ .WithMany()
+ .HasForeignKey("MangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Manga");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.DownloadSingleChapterJob", b =>
+ {
+ b.HasOne("API.Schema.Chapter", "Chapter")
+ .WithMany()
+ .HasForeignKey("ChapterId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Chapter");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.RetrieveChaptersJob", b =>
+ {
+ b.HasOne("API.Schema.Manga", "Manga")
+ .WithMany()
+ .HasForeignKey("MangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Manga");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.UpdateFilesDownloadedJob", b =>
+ {
+ b.HasOne("API.Schema.Manga", "Manga")
+ .WithMany()
+ .HasForeignKey("MangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Manga");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.UpdateMetadataJob", b =>
+ {
+ b.HasOne("API.Schema.Manga", "Manga")
+ .WithMany()
+ .HasForeignKey("MangaId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Manga");
+ });
+
+ modelBuilder.Entity("API.Schema.Jobs.Job", b =>
+ {
+ b.Navigation("DependsOnJobs");
+ });
+
+ modelBuilder.Entity("API.Schema.Manga", b =>
+ {
+ b.Navigation("AltTitles");
+
+ b.Navigation("Links");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/API/Migrations/20250313191146_dev-130325-6.cs b/API/Migrations/20250313191146_dev-130325-6.cs
new file mode 100644
index 0000000..9815f35
--- /dev/null
+++ b/API/Migrations/20250313191146_dev-130325-6.cs
@@ -0,0 +1,58 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace API.Migrations
+{
+ ///
+ public partial class dev1303256 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "ToLocation",
+ table: "Jobs",
+ type: "character varying(256)",
+ maxLength: 256,
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "text",
+ oldNullable: true);
+
+ migrationBuilder.AlterColumn(
+ name: "FromLocation",
+ table: "Jobs",
+ type: "character varying(256)",
+ maxLength: 256,
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "text",
+ oldNullable: true);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "ToLocation",
+ table: "Jobs",
+ type: "text",
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "character varying(256)",
+ oldMaxLength: 256,
+ oldNullable: true);
+
+ migrationBuilder.AlterColumn(
+ name: "FromLocation",
+ table: "Jobs",
+ type: "text",
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "character varying(256)",
+ oldMaxLength: 256,
+ oldNullable: true);
+ }
+ }
+}
diff --git a/API/Migrations/PgsqlContextModelSnapshot.cs b/API/Migrations/PgsqlContextModelSnapshot.cs
index 1dba2db..d717165 100644
--- a/API/Migrations/PgsqlContextModelSnapshot.cs
+++ b/API/Migrations/PgsqlContextModelSnapshot.cs
@@ -455,11 +455,13 @@ namespace API.Migrations
b.Property("FromLocation")
.IsRequired()
- .HasColumnType("text");
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
b.Property("ToLocation")
.IsRequired()
- .HasColumnType("text");
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
b.HasDiscriminator().HasValue((byte)3);
});
diff --git a/API/Schema/Jobs/DownloadAvailableChaptersJob.cs b/API/Schema/Jobs/DownloadAvailableChaptersJob.cs
index 16de9fe..ed2b092 100644
--- a/API/Schema/Jobs/DownloadAvailableChaptersJob.cs
+++ b/API/Schema/Jobs/DownloadAvailableChaptersJob.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using API.Schema.MangaConnectors;
using Newtonsoft.Json;
namespace API.Schema.Jobs;
@@ -7,7 +6,8 @@ namespace API.Schema.Jobs;
public class DownloadAvailableChaptersJob(ulong recurrenceMs, string mangaId, string? parentJobId = null, ICollection? dependsOnJobsIds = null)
: Job(TokenGen.CreateToken(typeof(DownloadAvailableChaptersJob)), JobType.DownloadAvailableChaptersJob, recurrenceMs, parentJobId, dependsOnJobsIds)
{
- [MaxLength(64)]
+ [StringLength(64)]
+ [Required]
public string MangaId { get; init; } = mangaId;
[JsonIgnore]
diff --git a/API/Schema/Jobs/DownloadMangaCoverJob.cs b/API/Schema/Jobs/DownloadMangaCoverJob.cs
index eba5ab1..80d2bc4 100644
--- a/API/Schema/Jobs/DownloadMangaCoverJob.cs
+++ b/API/Schema/Jobs/DownloadMangaCoverJob.cs
@@ -1,21 +1,13 @@
using System.ComponentModel.DataAnnotations;
-using System.IO.Compression;
-using System.Runtime.InteropServices;
-using API.MangaDownloadClients;
-using API.Schema.MangaConnectors;
using Newtonsoft.Json;
-using SixLabors.ImageSharp;
-using SixLabors.ImageSharp.Formats.Jpeg;
-using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Processors.Binarization;
-using static System.IO.UnixFileMode;
namespace API.Schema.Jobs;
public class DownloadMangaCoverJob(string mangaId, string? parentJobId = null, ICollection? dependsOnJobsIds = null)
: Job(TokenGen.CreateToken(typeof(DownloadMangaCoverJob)), JobType.DownloadMangaCoverJob, 0, parentJobId, dependsOnJobsIds)
{
- [MaxLength(64)]
+ [StringLength(64)]
+ [Required]
public string MangaId { get; init; } = mangaId;
[JsonIgnore]
public Manga? Manga { get; init; }
diff --git a/API/Schema/Jobs/DownloadSingleChapterJob.cs b/API/Schema/Jobs/DownloadSingleChapterJob.cs
index d611f79..e36fe61 100644
--- a/API/Schema/Jobs/DownloadSingleChapterJob.cs
+++ b/API/Schema/Jobs/DownloadSingleChapterJob.cs
@@ -15,7 +15,8 @@ namespace API.Schema.Jobs;
public class DownloadSingleChapterJob(string chapterId, string? parentJobId = null, ICollection? dependsOnJobsIds = null)
: Job(TokenGen.CreateToken(typeof(DownloadSingleChapterJob)), JobType.DownloadSingleChapterJob, 0, parentJobId, dependsOnJobsIds)
{
- [MaxLength(64)]
+ [StringLength(64)]
+ [Required]
public string ChapterId { get; init; } = chapterId;
[JsonIgnore]
diff --git a/API/Schema/Jobs/MoveFileOrFolderJob.cs b/API/Schema/Jobs/MoveFileOrFolderJob.cs
index 02ecf3d..0eb805b 100644
--- a/API/Schema/Jobs/MoveFileOrFolderJob.cs
+++ b/API/Schema/Jobs/MoveFileOrFolderJob.cs
@@ -1,9 +1,15 @@
-namespace API.Schema.Jobs;
+using System.ComponentModel.DataAnnotations;
+
+namespace API.Schema.Jobs;
public class MoveFileOrFolderJob(string fromLocation, string toLocation, string? parentJobId = null, ICollection? dependsOnJobsIds = null)
: Job(TokenGen.CreateToken(typeof(MoveFileOrFolderJob)), JobType.MoveFileOrFolderJob, 0, parentJobId, dependsOnJobsIds)
{
+ [StringLength(256)]
+ [Required]
public string FromLocation { get; init; } = fromLocation;
+ [StringLength(256)]
+ [Required]
public string ToLocation { get; init; } = toLocation;
protected override IEnumerable RunInternal(PgsqlContext context)
diff --git a/API/Schema/Jobs/RetrieveChaptersJob.cs b/API/Schema/Jobs/RetrieveChaptersJob.cs
index 441fd88..95d769a 100644
--- a/API/Schema/Jobs/RetrieveChaptersJob.cs
+++ b/API/Schema/Jobs/RetrieveChaptersJob.cs
@@ -7,7 +7,8 @@ namespace API.Schema.Jobs;
public class RetrieveChaptersJob(ulong recurrenceMs, string mangaId, string? parentJobId = null, ICollection? dependsOnJobsIds = null)
: Job(TokenGen.CreateToken(typeof(RetrieveChaptersJob)), JobType.RetrieveChaptersJob, recurrenceMs, parentJobId, dependsOnJobsIds)
{
- [MaxLength(64)]
+ [StringLength(64)]
+ [Required]
public string MangaId { get; init; } = mangaId;
[JsonIgnore]
diff --git a/API/Schema/Jobs/UpdateFilesDownloadedJob.cs b/API/Schema/Jobs/UpdateFilesDownloadedJob.cs
index e02fdec..836b1c7 100644
--- a/API/Schema/Jobs/UpdateFilesDownloadedJob.cs
+++ b/API/Schema/Jobs/UpdateFilesDownloadedJob.cs
@@ -6,7 +6,8 @@ namespace API.Schema.Jobs;
public class UpdateFilesDownloadedJob(ulong recurrenceMs, string mangaId, string? parentJobId = null, ICollection? dependsOnJobsIds = null)
: Job(TokenGen.CreateToken(typeof(UpdateFilesDownloadedJob)), JobType.UpdateFilesDownloadedJob, recurrenceMs, parentJobId, dependsOnJobsIds)
{
- [MaxLength(64)]
+ [StringLength(64)]
+ [Required]
public string MangaId { get; init; } = mangaId;
[JsonIgnore]
diff --git a/API/Schema/Jobs/UpdateMetadataJob.cs b/API/Schema/Jobs/UpdateMetadataJob.cs
index 0a0e97a..14a2164 100644
--- a/API/Schema/Jobs/UpdateMetadataJob.cs
+++ b/API/Schema/Jobs/UpdateMetadataJob.cs
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
-using API.Schema.MangaConnectors;
using Newtonsoft.Json;
namespace API.Schema.Jobs;
@@ -7,7 +6,8 @@ namespace API.Schema.Jobs;
public class UpdateMetadataJob(ulong recurrenceMs, string mangaId, string? parentJobId = null, ICollection? dependsOnJobsIds = null)
: Job(TokenGen.CreateToken(typeof(UpdateMetadataJob)), JobType.UpdateMetaDataJob, recurrenceMs, parentJobId, dependsOnJobsIds)
{
- [MaxLength(64)]
+ [StringLength(64)]
+ [Required]
public string MangaId { get; init; } = mangaId;
[JsonIgnore]