feat: bundle yt-dlp and improve add modal usability

This commit is contained in:
tongki078
2026-02-26 12:16:51 +09:00
parent d85fdc1101
commit 5d8fb9db55
11 changed files with 399 additions and 35 deletions

View File

@@ -55,7 +55,7 @@ async function handleRequest(message) {
ok: true,
version: '0.1.0',
host: 'org.gdown.nativehost',
capabilities: ['ping', 'addUri', 'focus'],
capabilities: ['ping', 'addUri', 'focus', 'extractor:yt-dlp'],
}
}
@@ -70,6 +70,8 @@ async function handleRequest(message) {
const authorization = String(message?.authorization || '').trim()
const proxy = String(message?.proxy || '').trim()
const split = Number(message?.split || 0)
const extractor = String(message?.extractor || '').trim()
const format = String(message?.format || '').trim()
const parsedCookie = parseCookieHeader(Array.isArray(message?.headers) ? message.headers : [])
const cookieValue = cookie || parsedCookie
@@ -84,6 +86,8 @@ async function handleRequest(message) {
authorization: authorization || undefined,
proxy: proxy || undefined,
split: Number.isFinite(split) && split > 0 ? Math.round(split) : undefined,
extractor: extractor || undefined,
format: format || undefined,
})
return {