From 541bf04575d7ee436c2ed64fb97c40c52f3f726e Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 2 Nov 2024 16:43:36 +0600 Subject: [PATCH] api/services: fix `createStream` calls in pickers oops --- api/src/processing/services/bluesky.js | 2 +- api/src/processing/services/instagram.js | 8 ++++---- api/src/processing/services/snapchat.js | 4 ++-- api/src/processing/services/tiktok.js | 2 +- api/src/processing/services/twitter.js | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api/src/processing/services/bluesky.js b/api/src/processing/services/bluesky.js index d200296c..98b92c64 100644 --- a/api/src/processing/services/bluesky.js +++ b/api/src/processing/services/bluesky.js @@ -48,7 +48,7 @@ const extractImages = ({ getPost, filename, alwaysProxy }) => { let proxiedImage = createStream({ service: "bluesky", type: "proxy", - u: url, + url, filename: `${filename}_${i + 1}.jpg`, }); diff --git a/api/src/processing/services/instagram.js b/api/src/processing/services/instagram.js index 17e78ec4..111d7603 100644 --- a/api/src/processing/services/instagram.js +++ b/api/src/processing/services/instagram.js @@ -177,7 +177,7 @@ export default function(obj) { if (alwaysProxy) proxyFile = createStream({ service: "instagram", type: "proxy", - u: url, + url, filename: `instagram_${id}_${i + 1}.${itemExt}` }); @@ -189,7 +189,7 @@ export default function(obj) { thumb: createStream({ service: "instagram", type: "proxy", - u: e.node?.display_url, + url: e.node?.display_url, filename: `instagram_${id}_${i + 1}.jpg` }) } @@ -230,7 +230,7 @@ export default function(obj) { if (alwaysProxy) proxyFile = createStream({ service: "instagram", type: "proxy", - u: url, + url, filename: `instagram_${id}_${i + 1}.${itemExt}` }); @@ -242,7 +242,7 @@ export default function(obj) { thumb: createStream({ service: "instagram", type: "proxy", - u: imageUrl, + url: imageUrl, filename: `instagram_${id}_${i + 1}.jpg` }) } diff --git a/api/src/processing/services/snapchat.js b/api/src/processing/services/snapchat.js index acb6813a..4c62a5ff 100644 --- a/api/src/processing/services/snapchat.js +++ b/api/src/processing/services/snapchat.js @@ -73,7 +73,7 @@ async function getStory(username, storyId, alwaysProxy) { const proxy = createStream({ service: "snapchat", type: "proxy", - u: snapUrl, + url: snapUrl, filename: `snapchat_${username}_${snap.timestampInSec.value}.${snapExt}`, }); @@ -81,7 +81,7 @@ async function getStory(username, storyId, alwaysProxy) { if (snapType === "video") thumbProxy = createStream({ service: "snapchat", type: "proxy", - u: snap.snapUrls.mediaPreviewUrl.value, + url: snap.snapUrls.mediaPreviewUrl.value, }); if (alwaysProxy) snapUrl = proxy; diff --git a/api/src/processing/services/tiktok.js b/api/src/processing/services/tiktok.js index e205ce54..d5e5c6e4 100644 --- a/api/src/processing/services/tiktok.js +++ b/api/src/processing/services/tiktok.js @@ -102,7 +102,7 @@ export default async function(obj) { if (obj.alwaysProxy) url = createStream({ service: "tiktok", type: "proxy", - u: url, + url, filename: `${filenameBase}_photo_${i + 1}.jpg` }) diff --git a/api/src/processing/services/twitter.js b/api/src/processing/services/twitter.js index 229415eb..b4a1d557 100644 --- a/api/src/processing/services/twitter.js +++ b/api/src/processing/services/twitter.js @@ -159,10 +159,10 @@ export default async function({ id, index, toGif, dispatcher, alwaysProxy }) { const getFileExt = (url) => new URL(url).pathname.split(".", 2)[1]; - const proxyMedia = (u, filename) => createStream({ + const proxyMedia = (url, filename) => createStream({ service: "twitter", type: "proxy", - u, filename, + url, filename, }) switch (media?.length) { @@ -217,7 +217,7 @@ export default async function({ id, index, toGif, dispatcher, alwaysProxy }) { url = createStream({ service: "twitter", type: shouldRenderGif ? "gif" : "remux", - u: url, + url, filename: videoFilename, }) } else if (alwaysProxy) {