REMOVE JobService dependency from MetadataService

This commit is contained in:
2025-07-03 22:17:22 +02:00
parent 159bcac5c4
commit 8de4a147f2

View File

@@ -18,12 +18,6 @@ import java.io.InputStreamReader;
public class MetadataService { public class MetadataService {
private static Logger logger = LoggerFactory.getLogger(MetadataService.class); private static Logger logger = LoggerFactory.getLogger(MetadataService.class);
private final JobService jobService;
public MetadataService(JobService jobService) {
this.jobService = jobService;
}
public VideoMetadata getVideoMetadata(File file) { public VideoMetadata getVideoMetadata(File file) {
logger.info("Getting metadata for file {}", file.getAbsolutePath()); logger.info("Getting metadata for file {}", file.getAbsolutePath());
@@ -50,16 +44,6 @@ public class MetadataService {
} }
} }
public VideoMetadata getInputFileMetadata(String uuid) {
Job job = jobService.getJob(uuid);
return getVideoMetadata(job.getInputFile());
}
public VideoMetadata getOutputFileMetadata(String uuid) {
Job job = jobService.getJob(uuid);
return getVideoMetadata(job.getOutputFile());
}
private JsonNode readStandardOutput(Process process) throws IOException{ private JsonNode readStandardOutput(Process process) throws IOException{
// Read the standard output (JSON metadata) // Read the standard output (JSON metadata)
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));