diff --git a/api/src/processing/services/reddit.js b/api/src/processing/services/reddit.js index 271cdc86..30084599 100644 --- a/api/src/processing/services/reddit.js +++ b/api/src/processing/services/reddit.js @@ -73,9 +73,12 @@ export default async function(obj) { data = data[0]?.data?.children[0]?.data; + const id = `${String(obj.sub).toLowerCase()}_${obj.id}`; + if (data?.url?.endsWith('.gif')) return { typeId: "redirect", - urls: data.url + urls: data.url, + filename: `reddit_${id}.gif`, } if (!data.secure_media?.reddit_video) @@ -109,8 +112,6 @@ export default async function(obj) { }).catch(() => {}) } - let id = `${String(obj.sub).toLowerCase()}_${obj.id}`; - if (!audio) return { typeId: "redirect", urls: video