Browse Source

Merge pull request #53 from ente-io/date_parsing_logic

Vishnu Mohandas 3 years ago
parent
commit
6a55fe44b0
2 changed files with 2 additions and 0 deletions
  1. 1 0
      lib/models/file.dart
  2. 1 0
      lib/utils/share_util.dart

+ 1 - 0
lib/models/file.dart

@@ -60,6 +60,7 @@ class File {
         final parsedDateTime = DateTime.parse(
             basenameWithoutExtension(file.title)
                 .replaceAll("IMG_", "")
+                .replaceAll("VID_", "")
                 .replaceAll("DCIM_", "")
                 .replaceAll("_", " "));
         file.creationTime = parsedDateTime.microsecondsSinceEpoch;

+ 1 - 0
lib/utils/share_util.dart

@@ -101,6 +101,7 @@ DateTime parseDateFromFileName(String fileName) {
   } else {
     return DateTime.tryParse((fileName)
         .replaceAll("IMG_", "")
+        .replaceAll("VID_", "")
         .replaceAll("DCIM_", "")
         .replaceAll("_", " "));
   }