Files
vod-system/src/main/java/com/ddf/vodsystem/dto/ProgressTracker.java
Dylan De Faoite 20f7ec8db4 Backend MP4 conversion (#23)
* ADD conversion queue

* ADD RemuxService for MP4 conversion

* REMOVE unused conversion queue

* REORGANISE Job-related classes

* ADD Job stages

* REVERT to old commit, using Spring Async instead

* ADD asynchronous processing for video tasks

* PATCH and streamline progress tracking

* ADD asynchronous video processing and job restructuring

* REFACTOR job service method

* ADD job remux functionality

* ADD remuxing endpoint

* PATCH complete flag not updating in API response

* ADD progress type in frontend

* ADD reset functionality for job status

* PATCH missing progress bar for subsequent exports

* REDESIGN settings box

* ADD tracking video file conversion in frontend

* PATCH extension bug

* REMOVE autowired decorator
2025-07-31 20:48:34 +02:00

31 lines
743 B
Java

package com.ddf.vodsystem.dto;
public class ProgressTracker {
private float progress = 0.0f;
private boolean isComplete = false;
public synchronized float getProgress() {
return progress;
}
public synchronized boolean isComplete() {
return isComplete;
}
public synchronized void setProgress(float newProgress) {
if (newProgress < 0 || newProgress > 1) {
throw new IllegalArgumentException("Progress must be between 0 and 1");
}
this.progress = newProgress;
}
public synchronized void markComplete() {
this.isComplete = true;
}
public synchronized void reset() {
this.progress = 0.0f;
this.isComplete = false;
}
}