on gallery urls, add media_metadata[i].p check

This commit is contained in:
teddit 2021-03-31 19:33:09 +02:00
parent 2bffcd3a27
commit 4216832cfb

View File

@ -124,6 +124,7 @@ module.exports = function(fetch) {
for(var i = 0; i < post.gallery_data.items.length; i++) {
let id = post.gallery_data.items[i].media_id
if(post.media_metadata[id]) {
if(post.media_metadata[id].p) {
if(post.media_metadata[id].p[0]) {
let item = { source: null, thumbnail: null, large: null }
if(post.media_metadata[id].s && post.media_metadata[id].p[0].u) {
@ -139,6 +140,7 @@ module.exports = function(fetch) {
}
}
}
}
let comms = []
for(var i = 0; i < comments.length; i++) {