Improve filename to datetime parsing for video files
This commit is contained in:
parent
abfcf95713
commit
fa4480eb44
|
@ -60,6 +60,7 @@ class File {
|
|||
final parsedDateTime = DateTime.parse(
|
||||
basenameWithoutExtension(file.title)
|
||||
.replaceAll("IMG_", "")
|
||||
.replaceAll("VID_", "")
|
||||
.replaceAll("DCIM_", "")
|
||||
.replaceAll("_", " "));
|
||||
file.creationTime = parsedDateTime.microsecondsSinceEpoch;
|
||||
|
|
|
@ -101,6 +101,7 @@ DateTime parseDateFromFileName(String fileName) {
|
|||
} else {
|
||||
return DateTime.tryParse((fileName)
|
||||
.replaceAll("IMG_", "")
|
||||
.replaceAll("VID_", "")
|
||||
.replaceAll("DCIM_", "")
|
||||
.replaceAll("_", " "));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue