feat: bundle yt-dlp and improve add modal usability
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user