瀏覽代碼

Add field to store starting index of motion photo

Neeraj Gupta 2 年之前
父節點
當前提交
8624f103b5
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      lib/models/magic_metadata.dart

+ 6 - 0
lib/models/magic_metadata.dart

@@ -21,6 +21,7 @@ const publicMagicKeyWidth = 'w';
 const publicMagicKeyHeight = 'h';
 const publicMagicKeyHeight = 'h';
 const pubMagicKeyLat = "lat";
 const pubMagicKeyLat = "lat";
 const pubMagicKeyLong = "long";
 const pubMagicKeyLong = "long";
+const pubMotionVideoIndex = "mvi";
 
 
 class MagicMetadata {
 class MagicMetadata {
   // 0 -> visible
   // 0 -> visible
@@ -52,6 +53,9 @@ class PubMagicMetadata {
   int? h;
   int? h;
   double? lat;
   double? lat;
   double? long;
   double? long;
+  // Motion Video Index. Positive value indicates that the file is a motion
+  // photo
+  int? mvi;
 
 
   PubMagicMetadata({
   PubMagicMetadata({
     this.editedTime,
     this.editedTime,
@@ -62,6 +66,7 @@ class PubMagicMetadata {
     this.h,
     this.h,
     this.lat,
     this.lat,
     this.long,
     this.long,
+    this.mvi,
   });
   });
 
 
   factory PubMagicMetadata.fromEncodedJson(String encodedJson) =>
   factory PubMagicMetadata.fromEncodedJson(String encodedJson) =>
@@ -81,6 +86,7 @@ class PubMagicMetadata {
       h: map[publicMagicKeyHeight],
       h: map[publicMagicKeyHeight],
       lat: map[pubMagicKeyLat],
       lat: map[pubMagicKeyLat],
       long: map[pubMagicKeyLong],
       long: map[pubMagicKeyLong],
+      mvi: map[pubMotionVideoIndex],
     );
     );
   }
   }
 }
 }