cleanup torrent cache

This commit is contained in:
Mukhtar Akere
2025-06-14 16:55:45 +01:00
parent a539aa53bd
commit 22280f15cf
5 changed files with 83 additions and 57 deletions

View File

@@ -293,6 +293,8 @@ func (r *Repair) StopJob(id string) error {
go func() {
if job.Status == JobStarted || job.Status == JobProcessing {
job.Status = JobCancelled
job.BrokenItems = nil
job.ctx = nil // Clear context to prevent further processing
job.CompletedAt = time.Now()
job.Error = "Job was cancelled by user"
r.saveToFile()