api/services: fix createStream calls in pickers

oops
This commit is contained in:
wukko 2024-11-02 16:43:36 +06:00
parent 382873dc11
commit 541bf04575
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
5 changed files with 11 additions and 11 deletions

View file

@ -48,7 +48,7 @@ const extractImages = ({ getPost, filename, alwaysProxy }) => {
let proxiedImage = createStream({ let proxiedImage = createStream({
service: "bluesky", service: "bluesky",
type: "proxy", type: "proxy",
u: url, url,
filename: `${filename}_${i + 1}.jpg`, filename: `${filename}_${i + 1}.jpg`,
}); });

View file

@ -177,7 +177,7 @@ export default function(obj) {
if (alwaysProxy) proxyFile = createStream({ if (alwaysProxy) proxyFile = createStream({
service: "instagram", service: "instagram",
type: "proxy", type: "proxy",
u: url, url,
filename: `instagram_${id}_${i + 1}.${itemExt}` filename: `instagram_${id}_${i + 1}.${itemExt}`
}); });
@ -189,7 +189,7 @@ export default function(obj) {
thumb: createStream({ thumb: createStream({
service: "instagram", service: "instagram",
type: "proxy", type: "proxy",
u: e.node?.display_url, url: e.node?.display_url,
filename: `instagram_${id}_${i + 1}.jpg` filename: `instagram_${id}_${i + 1}.jpg`
}) })
} }
@ -230,7 +230,7 @@ export default function(obj) {
if (alwaysProxy) proxyFile = createStream({ if (alwaysProxy) proxyFile = createStream({
service: "instagram", service: "instagram",
type: "proxy", type: "proxy",
u: url, url,
filename: `instagram_${id}_${i + 1}.${itemExt}` filename: `instagram_${id}_${i + 1}.${itemExt}`
}); });
@ -242,7 +242,7 @@ export default function(obj) {
thumb: createStream({ thumb: createStream({
service: "instagram", service: "instagram",
type: "proxy", type: "proxy",
u: imageUrl, url: imageUrl,
filename: `instagram_${id}_${i + 1}.jpg` filename: `instagram_${id}_${i + 1}.jpg`
}) })
} }

View file

@ -73,7 +73,7 @@ async function getStory(username, storyId, alwaysProxy) {
const proxy = createStream({ const proxy = createStream({
service: "snapchat", service: "snapchat",
type: "proxy", type: "proxy",
u: snapUrl, url: snapUrl,
filename: `snapchat_${username}_${snap.timestampInSec.value}.${snapExt}`, filename: `snapchat_${username}_${snap.timestampInSec.value}.${snapExt}`,
}); });
@ -81,7 +81,7 @@ async function getStory(username, storyId, alwaysProxy) {
if (snapType === "video") thumbProxy = createStream({ if (snapType === "video") thumbProxy = createStream({
service: "snapchat", service: "snapchat",
type: "proxy", type: "proxy",
u: snap.snapUrls.mediaPreviewUrl.value, url: snap.snapUrls.mediaPreviewUrl.value,
}); });
if (alwaysProxy) snapUrl = proxy; if (alwaysProxy) snapUrl = proxy;

View file

@ -102,7 +102,7 @@ export default async function(obj) {
if (obj.alwaysProxy) url = createStream({ if (obj.alwaysProxy) url = createStream({
service: "tiktok", service: "tiktok",
type: "proxy", type: "proxy",
u: url, url,
filename: `${filenameBase}_photo_${i + 1}.jpg` filename: `${filenameBase}_photo_${i + 1}.jpg`
}) })

View file

@ -159,10 +159,10 @@ export default async function({ id, index, toGif, dispatcher, alwaysProxy }) {
const getFileExt = (url) => new URL(url).pathname.split(".", 2)[1]; const getFileExt = (url) => new URL(url).pathname.split(".", 2)[1];
const proxyMedia = (u, filename) => createStream({ const proxyMedia = (url, filename) => createStream({
service: "twitter", service: "twitter",
type: "proxy", type: "proxy",
u, filename, url, filename,
}) })
switch (media?.length) { switch (media?.length) {
@ -217,7 +217,7 @@ export default async function({ id, index, toGif, dispatcher, alwaysProxy }) {
url = createStream({ url = createStream({
service: "twitter", service: "twitter",
type: shouldRenderGif ? "gif" : "remux", type: shouldRenderGif ? "gif" : "remux",
u: url, url,
filename: videoFilename, filename: videoFilename,
}) })
} else if (alwaysProxy) { } else if (alwaysProxy) {