Commit Graph

50 Commits

Author SHA1 Message Date
9af5c1603e Using HttpStatusCode to signify Task-Success
When DownloadChapterTask returns notfound, do not retry.
2023-06-20 15:46:54 +02:00
1035939309 Fix overflow 2023-06-20 15:18:58 +02:00
3b542c04f6 ReShaper cleanup,
Remove unnecessary using directives
2023-06-20 14:59:08 +02:00
e883277400 Renamed DownloadNewChaptersTask to MonitorPublicationTask
Added TrangaTask.Clone() method
Rewrote TrangaTask.progress for the billionth+1 time.
Removed Increment and DecrementProgress methods
Removed TrangaTask.ReplaceFailedChildTask method
Changed return type of TrangaTask.ExecuteTask to bool, signifying success.
Added Failed Execution state to TrangaTask
Replaced taskManager failed-task logic
Removed TaskManager bulky AddTask and DeleteTask methods
Removed TaskManager bulky Constructor
2023-06-20 14:57:44 +02:00
6cdccdf66b Fix infinite loop of DownloadNewChaptersTask 2023-06-19 22:32:32 +02:00
821a1b7c3a Unique IDs for TrangaTask now based on Random-generator 2023-06-19 17:17:24 +02:00
93de471836 Added TrangaTask.RemoveChildTask 2023-06-15 18:22:59 +02:00
76604d84d8 Better way of handling progress, and childProgress. 2023-06-11 18:24:26 +02:00
8e207c3119 Better way of handling progress, and childProgress. 2023-06-11 17:27:33 +02:00
36f7cbd3e9 Better way of handling progress, and childProgress.
More reliable taskFinishTime
2023-06-11 17:04:33 +02:00
d5c9c5ba96 Redid progress calcuation on DownloadNewChaptersTask and DownloadChapterTask 2023-06-10 16:00:16 +02:00
c8e27921ab Added taskId to trangaTask and parentTaskId to DownloadChapterTask as unique identifier to attach ChildTasks to ParentTask on deserialization. 2023-06-10 15:59:42 +02:00
6eaba07801 Changed progress type from float to double 2023-06-10 15:58:11 +02:00
1c94625840 Added CancellationToken to TrangaTask #14 2023-06-10 14:27:09 +02:00
89c80d2997 Fixed bug where tasks would instantly failed when launched #14 2023-06-09 23:42:54 +02:00
a3a96b6b55 Added DecrementProgress function to TrangaTask 2023-06-09 23:38:28 +02:00
87eade10cf #40 task timeout criteria 2023-06-07 00:27:53 +02:00
5c753e7a7d Added fields to TrangaTask:
executionStarted,
executionApproximatelyFinished,
executionApproximatelyRemaining
to track progress
2023-06-06 21:19:30 +02:00
17ce820cf3 Changed taskProgress increment to call method that updates progress accordingly (with parent-tasks being also updated) 2023-06-06 20:54:21 +02:00
bd189984a9 Rewrote entire Task-Structure:
TrangaTask now only contains essentials, derived classes contain specific information such as connectorName, publication, chapter, etc.
Removed taskQueue system, instead all tasks are kept in _allTasks.
Progress is being tracked in TrangaTask resolves #36 resolves #32
Added new TrangaTask: DownloadChapter to download single chapters. #35
Fixed duplicate file-access when writing settings.
2023-06-05 00:38:07 +02:00
ae63a216a5 unnecessary params 2023-06-03 15:27:35 +02:00
5d98295c59 #33 Preparation:
TrangaSettings now stores Hashset of LibraryManagers
2023-06-03 15:17:08 +02:00
0d3799e00d Fix Bug when strings where shorter than 25 characters on logger.writeline
Fixed CLI output
2023-06-01 22:27:37 +02:00
1bca99cb6a #32 Added progress tracking to task (internal and log use for now) 2023-06-01 22:05:48 +02:00
8bc23f7c69 Instead of relying on concreate tasks to do chores, create method in abstract class that calls the BL in concrete class and does chores before and after execution 2023-06-01 10:35:23 +02:00
61ecefb615 Logging and Chores in abstract class 2023-05-31 22:32:37 +02:00
8ff65bf400 compatibility with older tasks.json 2023-05-31 22:26:53 +02:00
fbba7c45b9 annotation 2023-05-31 21:44:16 +02:00
d9b6062767 Custom JSON Deserializer for concrete classes of abstract class TrangaTask 2023-05-31 21:43:07 +02:00
f892db7dda Switch Execution State to Running when executing 2023-05-31 21:40:00 +02:00
1b9ebd096b Removed TaskExecutor
TrangaTask is now abstract
TrangaTask implements Execute Method, that is now called instead of TaskExecutor
Created inheriting classes of TrangaTask: UpdateKomgaLibraryTask, DownloadNewChaptersTask
2023-05-31 21:15:32 +02:00
5aa3214ce5 TrangaTask.ToString() rewrite for logs-readability.
LogMessages only include class-name without path
2023-05-22 21:37:02 +02:00
a6a2d20981 More fancy CLI 2023-05-20 16:35:45 +02:00
086d72565a Formatting of trangaTask string with fixed-with instead of tabs 2023-05-20 16:23:25 +02:00
430ee2301f Implemented Queue, so that taskManager is not held up with other Connector-tasks.
Tasks are now executed in another Thread.
Replaced TrangaTask.isBeingExecuted bool with 3-states: Waiting, Enqueued, Running
Added Queue size to CLI output.
2023-05-20 14:50:48 +02:00
538cfec619 Added UpdateKomgaTask
Fixed Komga-auth
Added Komga to data.json
2023-05-20 14:07:38 +02:00
ff01bac9d4 Changed ComicInfo.xml to use chapternumber as "Number". 2023-05-20 12:53:54 +02:00
08e0fe7c71 We happy? We happy. Thanks ReSharper 2023-05-20 01:06:12 +02:00
2b18dc9d4f Added TrangaTask.ToString 2023-05-20 00:37:31 +02:00
124c644db1 Added summary for TaskExecutor, TaskManager, TrangaTask 2023-05-19 20:03:17 +02:00
312672a05c Check if task is already being executed before running again. 2023-05-19 19:20:06 +02:00
dd58efce06 Working TaskManager and Tasks 2023-05-19 16:27:56 +02:00
afe36ab2ef Switch to Newtonsoft.Json for serialization 2023-05-19 16:23:37 +02:00
6de6d060c4 Rewrite Task-Structure for serialization.
TrangaTask include information on what to execute where, do not execute tasks.
TaskExecutor executes Tasks on information from TrangaTask
2023-05-19 14:00:30 +02:00
86bb49508a Revert serialization attempt 2023-05-18 21:08:09 +02:00
1f8e8fb740 Fixed Capitalization
Added fields for serialization
2023-05-18 21:03:03 +02:00
0fc146019a Rewrite of Task-System for serialization. 2023-05-18 20:58:03 +02:00
glax
86712714f2 Implemented CreateUpdateChaptersTask
Implemented CreateUpdatePublicationsTask
2023-05-18 19:12:17 +02:00
glax
317d1435f3 Add Publication to DownloadChapter Method, to later correctly save images. 2023-05-18 16:21:02 +02:00
glax
d6ec91c896 Moved files
Added DownloadClient to Connector
2023-05-18 12:26:15 +02:00