mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-22 07:02:29 +00:00
Fixing SUD order
This commit is contained in:
parent
c95579d04f
commit
db037c6d29
@ -861,7 +861,19 @@ public class FolderInputSystem extends FileInputSystem implements PamSettings, D
|
|||||||
long[] allFileStarts = new long[allFiles.size()];
|
long[] allFileStarts = new long[allFiles.size()];
|
||||||
for (int i = 0; i < allFiles.size(); i++) {
|
for (int i = 0; i < allFiles.size(); i++) {
|
||||||
allFileStarts[i] = getFileStartTime(allFiles.get(i).getAbsoluteFile());
|
allFileStarts[i] = getFileStartTime(allFiles.get(i).getAbsoluteFile());
|
||||||
|
if (allFileStarts[i] < firstFileStart) {
|
||||||
|
// System.out.printf("Swap first file from %s to %s\n", firstFile.getName(), allFiles.get(i).getName());
|
||||||
|
firstFile = allFiles.get(i);
|
||||||
|
firstFileStart = allFileStarts[i];
|
||||||
|
}
|
||||||
|
if (allFileStarts[i] > lastFileEnd) {
|
||||||
|
// System.out.printf("Swap last file from %s to %s\n", lastFile.getName(), allFiles.get(i).getName());
|
||||||
|
lastFile = allFiles.get(i);
|
||||||
|
lastFileEnd = allFileStarts[i] + (long) (lastFile.getDurationInSeconds()*1000.);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
storeInfo.setFirstFileStart(firstFileStart); // just incase changed.
|
||||||
|
storeInfo.setLastFileEnd(lastFileEnd); // just incase changed
|
||||||
storeInfo.setFileStartTimes(allFileStarts);
|
storeInfo.setFileStartTimes(allFileStarts);
|
||||||
}
|
}
|
||||||
return storeInfo;
|
return storeInfo;
|
||||||
|
@ -76,6 +76,27 @@ public class InputStoreInfo {
|
|||||||
return fileStartTimes;
|
return fileStartTimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param firstFileStart the firstFileStart to set
|
||||||
|
*/
|
||||||
|
public void setFirstFileStart(long firstFileStart) {
|
||||||
|
this.firstFileStart = firstFileStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param lastFileStart the lastFileStart to set
|
||||||
|
*/
|
||||||
|
public void setLastFileStart(long lastFileStart) {
|
||||||
|
this.lastFileStart = lastFileStart;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param lastFileEnd the lastFileEnd to set
|
||||||
|
*/
|
||||||
|
public void setLastFileEnd(long lastFileEnd) {
|
||||||
|
this.lastFileEnd = lastFileEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user