fixed proxy search

This commit is contained in:
stratuma 2024-05-24 00:47:35 +02:00
parent fd480009c9
commit 1db7b8f6ff
4 changed files with 18 additions and 3 deletions

View File

@ -41,6 +41,8 @@ export async function searchCrunchy(q: string) {
const { data: tokeng, error: tokenerrorg } = await crunchyLogin(p.code)
if (!tokeng.value) {
console.log(p.code)
console.log(tokenerrorg)
return
}

View File

@ -527,10 +527,14 @@ onMounted(() => {
;(window as any).myAPI.getFolder().then((result: any) => {
path.value = result
})
;(window as any).myAPI.getArray('defdubarray').then((result: any) => {
;(window as any).myAPI.getArray('defdubarray').then((result: string) => {
if (!result || result.length === 0) return
dubLocales.value = JSON.parse(result)
})
;(window as any).myAPI.getArray('defsubarray').then((result: any) => {
;(window as any).myAPI.getArray('defsubarray').then((result: string) => {
if (!result || result.length === 0) return
subLocales.value = JSON.parse(result)
})
})

View File

@ -77,6 +77,16 @@ async function crunchyLoginFetchProxy(user: string, passw: string, geo: string)
var endpoint = await settings.get('CREndpoint')
const drmL3blob = await settings.has('l3blob')
const drmL3key = await settings.has('l3key')
if (!drmL3blob || !drmL3key) {
endpoint = 1
}
if (!endpoint) {
await settings.set('CREndpoint', 1)
endpoint = 1
}
var proxy:
| {
name: string

View File

@ -75,7 +75,6 @@ export async function downloadMPDAudio(
async function fetchAndPipe(url: string, stream: fs.WriteStream, index: number, downloadID: number, name: string) {
try {
const dn = downloading.find((i) => i.id === downloadID && i.audio === name)
const response = await fetch(url)