mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-09 14:46:05 +02:00
Compare commits
3 Commits
0.6
...
578fa5e6be
Author | SHA1 | Date | |
---|---|---|---|
578fa5e6be | |||
4d33e78123 | |||
52ac3e4e4e |
@ -58,7 +58,7 @@ app.MapPost("/Tasks/Create", (string taskType, string? connectorName, string? pu
|
||||
taskManager.AddTask(task, connectorName, publication, TimeSpan.Parse(reoccurrenceTime), language??"");
|
||||
});
|
||||
|
||||
app.MapPost("/Tasks/Delete", (string taskType, string? connectorName, string? publicationId) =>
|
||||
app.MapDelete("/Tasks/Delete", (string taskType, string? connectorName, string? publicationId) =>
|
||||
{
|
||||
Publication? publication = taskManager.GetAllPublications().FirstOrDefault(pub => pub.internalId == publicationId);
|
||||
TrangaTask.Task task = Enum.Parse<TrangaTask.Task>(taskType);
|
||||
@ -93,7 +93,7 @@ app.MapPost("/Queue/Enqueue", (string taskType, string? connectorName, string? p
|
||||
taskManager.AddTaskToQueue(task);
|
||||
});
|
||||
|
||||
app.MapPost("/Queue/Dequeue", (string taskType, string? connectorName, string? publicationId) =>
|
||||
app.MapDelete("/Queue/Dequeue", (string taskType, string? connectorName, string? publicationId) =>
|
||||
{
|
||||
TrangaTask.Task pTask = Enum.Parse<TrangaTask.Task>(taskType);
|
||||
TrangaTask? task = taskManager.GetAllTasks().FirstOrDefault(tTask =>
|
||||
|
@ -83,7 +83,6 @@ public class MangaDex : Connector
|
||||
}
|
||||
|
||||
Dictionary<string, string> linksDict = new();
|
||||
string[,]? links = null;
|
||||
if (attributes.ContainsKey("links") && attributes["links"] is not null)
|
||||
{
|
||||
JsonObject linksObject = attributes["links"]!.AsObject();
|
||||
|
@ -9,23 +9,18 @@ public readonly struct Publication
|
||||
{
|
||||
public string sortName { get; }
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global we need it, trust
|
||||
[JsonIgnore]public Dictionary<string,string> altTitles { get; }
|
||||
public Dictionary<string,string> altTitles { get; }
|
||||
// ReSharper disable trice MemberCanBePrivate.Global, trust
|
||||
public string? description { get; }
|
||||
public string[] tags { get; }
|
||||
public string? posterUrl { get; }
|
||||
[JsonIgnore]public Dictionary<string,string> links { get; }
|
||||
public Dictionary<string,string> links { get; }
|
||||
public int? year { get; }
|
||||
public string? originalLanguage { get; }
|
||||
public string status { get; }
|
||||
public string folderName { get; }
|
||||
public string downloadUrl { get; }
|
||||
public string internalId { get; }
|
||||
|
||||
public readonly struct ValueTuple
|
||||
{
|
||||
|
||||
}
|
||||
[JsonIgnore]public string internalId { get; }
|
||||
|
||||
public Publication(string sortName, string? description, Dictionary<string,string> altTitles, string[] tags, string? posterUrl, Dictionary<string,string>? links, int? year, string? originalLanguage, string status, string downloadUrl)
|
||||
{
|
||||
|
Reference in New Issue
Block a user