Browse Source

Update AccountImport.vue, fix new IG export format

Daniel Supernault 1 năm trước cách đây
mục cha
commit
59aa6a4b02
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      resources/assets/components/AccountImport.vue

+ 2 - 2
resources/assets/components/AccountImport.vue

@@ -381,7 +381,7 @@
                 let file = this.$refs.zipInput.files[0];
                 let entries = await this.model(file);
                 if (entries && entries.length) {
-                    let files = await entries.filter(e => e.filename === 'content/posts_1.json');
+                    let files = await entries.filter(e => e.filename === 'content/posts_1.json' || e.filename === 'your_instagram_activity/content/posts_1.json');
 
                     if(!files || !files.length) {
                         this.contactModal(
@@ -402,7 +402,7 @@
                 let entries = await this.model(file);
                 if (entries && entries.length) {
                     this.zipFiles = entries;
-                    let media = await entries.filter(e => e.filename === 'content/posts_1.json')[0].getData(new zip.TextWriter());
+                    let media = await entries.filter(e => e.filename === 'content/posts_1.json' || e.filename === 'your_instagram_activity/content/posts_1.json')[0].getData(new zip.TextWriter());
                     this.filterPostMeta(media);
 
                     let imgs = await Promise.all(entries.filter(entry => {