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??"");
|
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);
|
Publication? publication = taskManager.GetAllPublications().FirstOrDefault(pub => pub.internalId == publicationId);
|
||||||
TrangaTask.Task task = Enum.Parse<TrangaTask.Task>(taskType);
|
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);
|
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 pTask = Enum.Parse<TrangaTask.Task>(taskType);
|
||||||
TrangaTask? task = taskManager.GetAllTasks().FirstOrDefault(tTask =>
|
TrangaTask? task = taskManager.GetAllTasks().FirstOrDefault(tTask =>
|
||||||
|
@ -83,7 +83,6 @@ public class MangaDex : Connector
|
|||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, string> linksDict = new();
|
Dictionary<string, string> linksDict = new();
|
||||||
string[,]? links = null;
|
|
||||||
if (attributes.ContainsKey("links") && attributes["links"] is not null)
|
if (attributes.ContainsKey("links") && attributes["links"] is not null)
|
||||||
{
|
{
|
||||||
JsonObject linksObject = attributes["links"]!.AsObject();
|
JsonObject linksObject = attributes["links"]!.AsObject();
|
||||||
|
@ -9,23 +9,18 @@ public readonly struct Publication
|
|||||||
{
|
{
|
||||||
public string sortName { get; }
|
public string sortName { get; }
|
||||||
// ReSharper disable UnusedAutoPropertyAccessor.Global we need it, trust
|
// 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
|
// ReSharper disable trice MemberCanBePrivate.Global, trust
|
||||||
public string? description { get; }
|
public string? description { get; }
|
||||||
public string[] tags { get; }
|
public string[] tags { get; }
|
||||||
public string? posterUrl { get; }
|
public string? posterUrl { get; }
|
||||||
[JsonIgnore]public Dictionary<string,string> links { get; }
|
public Dictionary<string,string> links { get; }
|
||||||
public int? year { get; }
|
public int? year { get; }
|
||||||
public string? originalLanguage { get; }
|
public string? originalLanguage { get; }
|
||||||
public string status { get; }
|
public string status { get; }
|
||||||
public string folderName { get; }
|
public string folderName { get; }
|
||||||
public string downloadUrl { get; }
|
public string downloadUrl { get; }
|
||||||
public string internalId { get; }
|
[JsonIgnore]public string internalId { get; }
|
||||||
|
|
||||||
public readonly struct ValueTuple
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
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)
|
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