REMOVE JobService dependency from MetadataService
This commit is contained in:
@@ -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()));
|
||||||
|
|||||||
Reference in New Issue
Block a user