mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-15 09:50:44 +02:00
Fix MetadataEntry endpoints, payload
Some checks failed
Docker Image CI / build (push) Has been cancelled
Some checks failed
Docker Image CI / build (push) Has been cancelled
This commit is contained in:
@@ -18,7 +18,6 @@ public class Manga : Identifiable
|
||||
public MangaReleaseStatus ReleaseStatus { get; internal set; }
|
||||
[StringLength(64)] public string? LibraryId { get; private set; }
|
||||
public FileLibrary? Library = null!;
|
||||
|
||||
public ICollection<Author> Authors { get; internal set; } = null!;
|
||||
public ICollection<MangaTag> MangaTags { get; internal set; } = null!;
|
||||
public ICollection<Link> Links { get; internal set; } = null!;
|
||||
@@ -31,13 +30,20 @@ public class Manga : Identifiable
|
||||
|
||||
|
||||
/// <exception cref="DirectoryNotFoundException">Library not loaded</exception>
|
||||
[NotMapped] public string FullDirectoryPath => EnsureDirectoryExists();
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
public string FullDirectoryPath => EnsureDirectoryExists();
|
||||
|
||||
[NotMapped] public ICollection<string> ChapterIds => Chapters.Select(c => c.Key).ToList();
|
||||
[NotMapped]
|
||||
public ICollection<string> ChapterIds => Chapters.Select(c => c.Key).ToList();
|
||||
[JsonIgnore]
|
||||
public ICollection<Chapter> Chapters = null!;
|
||||
|
||||
[NotMapped] public Dictionary<string, string> IdsOnMangaConnectors => MangaConnectorIds.ToDictionary(id => id.MangaConnectorName, id => id.IdOnConnectorSite);
|
||||
[NotMapped] public ICollection<string> MangaConnectorIdsIds => MangaConnectorIds.Select(id => id.Key).ToList();
|
||||
[NotMapped]
|
||||
public Dictionary<string, string> IdsOnMangaConnectors => MangaConnectorIds.ToDictionary(id => id.MangaConnectorName, id => id.IdOnConnectorSite);
|
||||
[NotMapped]
|
||||
public ICollection<string> MangaConnectorIdsIds => MangaConnectorIds.Select(id => id.Key).ToList();
|
||||
[JsonIgnore]
|
||||
public ICollection<MangaConnectorId<Manga>> MangaConnectorIds = null!;
|
||||
|
||||
public Manga(string name, string description, string coverUrl, MangaReleaseStatus releaseStatus,
|
||||
|
@@ -99,10 +99,6 @@ public class MangaContext(DbContextOptions<MangaContext> options) : TrangaBaseCo
|
||||
.HasOne<Manga>(entry => entry.Manga)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
modelBuilder.Entity<MetadataEntry>()
|
||||
.HasOne<MetadataFetcher>(entry => entry.MetadataFetcher)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
}
|
||||
|
||||
public async Task<Manga?> FindMangaLike(Manga other, CancellationToken token)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@@ -10,6 +11,7 @@ public class MetadataEntry
|
||||
public Manga Manga { get; init; } = null!;
|
||||
public string MangaId { get; init; }
|
||||
[JsonIgnore]
|
||||
[NotMapped]
|
||||
public MetadataFetcher MetadataFetcher { get; init; } = null!;
|
||||
public string MetadataFetcherName { get; init; }
|
||||
public string Identifier { get; init; }
|
||||
|
Reference in New Issue
Block a user