mirror of
https://codeberg.org/tacerus/teddit.git
synced 2025-02-16 22:20:59 +01:00
post hint can be 'rich:video', 'hosted:video' etc, so just check if it has ':video'
This commit is contained in:
parent
185cf22847
commit
f1d02aac1a
@ -52,7 +52,7 @@ module.exports = function() {
|
|||||||
} else {
|
} else {
|
||||||
if(data.preview.images[0].resolutions[0]) {
|
if(data.preview.images[0].resolutions[0]) {
|
||||||
let preview = null
|
let preview = null
|
||||||
if(!isGif(data.url) && data.post_hint !== 'rich:video')
|
if(!isGif(data.url) && !data.post_hint.includes(':video'))
|
||||||
preview = await downloadAndSave(data.preview.images[0].source.url)
|
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_'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user