refactor(media): consolidate upload/edit/download into MediaService
Merge UploadService, EditService, JobOrchestrationService, and
DownloadService into a single MediaService with a unified Job lifecycle
(READY → PROCESSING → SUCCEEDED/FAILED via JobState enum).
- Add MediaController (/api/v1/media) exposing compress, save, and clip
- Add JobController (/api/v1/job) for status polling and file download
- Move clip/thumbnail download into ClipController (/{id}/media, /{id}/thumbnail)
- Move stream saveSection/clip from StreamService into MediaService
- Simplify Job DTO: remove dual ClipOptions/files, add ProgressTracker and download file
- Refactor JobRegistryService.add() → generateJob() to co-locate creation and registration
- Wire FFmpeg out_time_ms progress parsing into StreamActionsService via CommandRunner
- Rename GET /api/v1/auth/user → GET /api/v1/user/me
- Delete DownloadController, MetadataController, UploadController
This commit is contained in:
@@ -119,17 +119,6 @@ public class DirectoryService {
|
||||
logger.info("Deleted source file: {}", source.getAbsolutePath());
|
||||
}
|
||||
|
||||
public String getFileExtension(String filePath) {
|
||||
Path path = Paths.get(filePath);
|
||||
String fileName = path.getFileName().toString();
|
||||
|
||||
int dotIndex = fileName.lastIndexOf('.');
|
||||
if (dotIndex == -1) {
|
||||
return ""; // No extension
|
||||
}
|
||||
return fileName.substring(dotIndex + 1);
|
||||
}
|
||||
|
||||
private void createDirectory(String dir) throws IOException {
|
||||
// Create the directory if it doesn't exist
|
||||
Path outputPath = Paths.get(dir);
|
||||
|
||||
Reference in New Issue
Block a user