diff --git a/src/plugins/Instagram/index.js b/src/plugins/Instagram/index.js index 212f71d4d..cb36a7607 100644 --- a/src/plugins/Instagram/index.js +++ b/src/plugins/Instagram/index.js @@ -102,6 +102,7 @@ module.exports = class Instagram extends Plugin { getItemName (item) { if (item && item['created_time']) { + const ext = item.type === 'video' ? 'mp4' : 'jpeg' let date = new Date(item['created_time'] * 1000) date = date.toLocaleDateString([], { year: 'numeric', @@ -111,7 +112,7 @@ module.exports = class Instagram extends Plugin { minute: 'numeric' }) // adding both date and carousel_id, so the name is unique - return `Instagram ${date} ${item.carousel_id || ''}` + return `Instagram ${date} ${item.carousel_id || ''}.${ext}` } return '' }