Summary
There's a lot of changes here mostly because of the file re-structuration done in order to align better on the planified directory structure.
Regarding the download refactoring, here is a slightly simplified overview of how it works now:
sequenceDiagram
participant Monitor as DownloadMonitor
participant Gateway as DownloadClientGateway
participant Adapter as IDownloadClientAdapter
participant JobService as DownloadProcessingJobService
participant Processor as DownloadProcessingJobProcessor
participant ImportService as DownloadImportService
participant FileMover as FileMover
Note over Monitor, Adapter: Phase 1: Monitoring
loop Every X seconds
Monitor->>Gateway: FetchDownloadsAsync(client, downloads)
Gateway->>Adapter: FetchDownloadsAsync(client, downloads)
Adapter-->>Gateway: List<Download>
Gateway-->>Monitor: List<Download>
end
Note over Monitor, JobService: Phase 2: Completion Trigger
opt Status == Completed
Monitor->>JobService: EnqueueAsync(download)
JobService-->>Monitor: Task Created
end
Note over Processor, FileMover: Phase 3: Processing & Import
Processor->>JobService: GetNextJobAsync()
Processor->>Gateway: GetDownloadedFiles(download)
Gateway->>Adapter: GetQueueItemAsync(client, download)
Adapter-->>Gateway: QueueItem
Gateway-->>Processor: QueueItem with list of files
Processor->>ImportService: ImportDownloadFilesAsync(audiobook, files)
loop For each file
ImportService->>FileMover: PerformAction(Action, Source, Destination)
FileMover-->>ImportService: Success
end
ImportService-->>Processor: File Imported
The main things to note is that all duplication of responsability regarding downl...
Automated Canary build