if (service == null) {
log.error("No service found for {}", file.getAbsolutePath());
return 0;
}
try {
IStreamableFile streamFile = service.getStreamableFile(file);
ITagReader reader = streamFile.getReader();
duration = (double) reader.getDuration() / 1000;
reader.close();
} catch (IOException e) {
log.error("error read stream file {}. {}", file.getAbsolutePath(), e);
}