mirror of
https://github.com/wukko/cobalt.git
synced 2025-03-10 11:08:53 +01:00
api/schema: tiktokH265 -> allowH265, twitterGif -> convertGif
h265 param is already used for more than tiktok, and gif param will be used for bluesky gifs in the future
This commit is contained in:
parent
a43e7a629b
commit
e7d4b72c8c
3 changed files with 9 additions and 8 deletions
|
@ -15,7 +15,7 @@ export default function({
|
|||
isAudioMuted,
|
||||
disableMetadata,
|
||||
filenameStyle,
|
||||
twitterGif,
|
||||
convertGif,
|
||||
requestIP,
|
||||
audioBitrate,
|
||||
alwaysProxy,
|
||||
|
@ -37,7 +37,7 @@ export default function({
|
|||
|
||||
if (r.isPhoto) action = "photo";
|
||||
else if (r.picker) action = "picker"
|
||||
else if (r.isGif && twitterGif) action = "gif";
|
||||
else if (r.isGif && convertGif) action = "gif";
|
||||
else if (isAudioOnly) action = "audio";
|
||||
else if (isAudioMuted) action = "muteVideo";
|
||||
else if (r.isHLS) action = "hls";
|
||||
|
|
|
@ -70,7 +70,7 @@ export default async function({ host, patternMatch, params }) {
|
|||
r = await twitter({
|
||||
id: patternMatch.id,
|
||||
index: patternMatch.index - 1,
|
||||
toGif: !!params.twitterGif,
|
||||
toGif: !!params.convertGif,
|
||||
alwaysProxy: params.alwaysProxy,
|
||||
dispatcher
|
||||
});
|
||||
|
@ -132,7 +132,7 @@ export default async function({ host, patternMatch, params }) {
|
|||
shortLink: patternMatch.shortLink,
|
||||
fullAudio: params.tiktokFullAudio,
|
||||
isAudioOnly,
|
||||
h265: params.tiktokH265,
|
||||
h265: params.allowH265,
|
||||
alwaysProxy: params.alwaysProxy,
|
||||
});
|
||||
break;
|
||||
|
@ -243,7 +243,7 @@ export default async function({ host, patternMatch, params }) {
|
|||
case "xiaohongshu":
|
||||
r = await xiaohongshu({
|
||||
...patternMatch,
|
||||
h265: params.tiktokH265,
|
||||
h265: params.allowH265,
|
||||
isAudioOnly,
|
||||
dispatcher,
|
||||
});
|
||||
|
@ -300,7 +300,7 @@ export default async function({ host, patternMatch, params }) {
|
|||
isAudioMuted,
|
||||
disableMetadata: params.disableMetadata,
|
||||
filenameStyle: params.filenameStyle,
|
||||
twitterGif: params.twitterGif,
|
||||
convertGif: params.convertGif,
|
||||
requestIP,
|
||||
audioBitrate: params.audioBitrate,
|
||||
alwaysProxy: params.alwaysProxy,
|
||||
|
|
|
@ -37,9 +37,10 @@ export const apiSchema = z.object({
|
|||
.optional(),
|
||||
|
||||
disableMetadata: z.boolean().default(false),
|
||||
|
||||
allowH265: z.boolean().default(false),
|
||||
convertGif: z.boolean().default(true),
|
||||
tiktokFullAudio: z.boolean().default(false),
|
||||
tiktokH265: z.boolean().default(false),
|
||||
twitterGif: z.boolean().default(true),
|
||||
|
||||
alwaysProxy: z.boolean().default(false),
|
||||
localProcessing: z.boolean().default(false),
|
||||
|
|
Loading…
Reference in a new issue