mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 23:09:28 +01:00
fixes for the #134 PR
This commit is contained in:
parent
666a4bdd01
commit
185cf22847
@ -51,9 +51,12 @@ module.exports = function() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(data.preview.images[0].resolutions[0]) {
|
if(data.preview.images[0].resolutions[0]) {
|
||||||
|
let preview = null
|
||||||
|
if(!isGif(data.url) && data.post_hint !== 'rich:video')
|
||||||
|
preview = await downloadAndSave(data.preview.images[0].source.url)
|
||||||
images = {
|
images = {
|
||||||
thumb: await downloadAndSave(data.preview.images[0].resolutions[0].url, 'thumb_'),
|
thumb: await downloadAndSave(data.preview.images[0].resolutions[0].url, 'thumb_'),
|
||||||
preview: await downloadAndSave(data.preview.images[0].source.url, 'preview_')
|
preview: preview
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user