This commit is contained in:
stratuma 2024-05-24 01:48:11 +02:00
parent 0e9e3080f1
commit 0b967d5189
3 changed files with 82 additions and 81 deletions

View File

@ -131,11 +131,15 @@
<div class="text-xs">Dubs: {{ p.dub.map((t) => t.name).join(', ') }}</div>
<div class="text-xs mr-20">Subs: {{ p.sub.length !== 0 ? p.sub.map((t) => t.name).join(', ') : '-' }}</div>
<div class="absolute flex flex-col ml-auto gap-0.5 right-0 bottom-0">
<div v-if="p.totaldownloaded && p.status === 'downloading' || p.totaldownloaded && p.status === 'downloading video'" class="text-xs ml-auto"
<div v-if="(p.totaldownloaded && p.status === 'downloading') || (p.totaldownloaded && p.status === 'downloading video')" class="text-xs ml-auto"
>{{ (p.totaldownloaded / Math.pow(1024, 2)).toFixed(2) }} MB</div
>
<div v-if="p.partsleft && p.status === 'downloading' || p.totaldownloaded && p.status === 'downloading video'" class="text-xs ml-auto">{{ p.partsdownloaded }}/{{ p.partsleft }}</div>
<div v-if="p.downloadspeed && p.status === 'downloading' || p.totaldownloaded && p.status === 'downloading video'" class="text-xs ml-auto">{{ p.downloadspeed }} MB/s</div>
<div v-if="(p.partsleft && p.status === 'downloading') || (p.totaldownloaded && p.status === 'downloading video')" class="text-xs ml-auto"
>{{ p.partsdownloaded }}/{{ p.partsleft }}</div
>
<div v-if="(p.downloadspeed && p.status === 'downloading') || (p.totaldownloaded && p.status === 'downloading video')" class="text-xs ml-auto"
>{{ p.downloadspeed }} MB/s</div
>
</div>
<button @click="openFolder(p.installDir)" v-if="p.status === 'completed'" class="ml-auto h-9 w-9 hover:bg-[#ffffff2c] rounded-xl transition-all">
<Icon name="ph:folder-open" class="h-5 w-5 text-white" />

View File

@ -502,14 +502,11 @@ export async function crunchyGetPlaylist(q: string, geo: string | undefined) {
throw new Error(e as string)
}
if (isProxyActive)
await deactivateVideoToken(q, playlist.token)
if (isProxyActive) await deactivateVideoToken(q, playlist.token)
decrementPlaylistCounter()
for (const p of proxies) {
if (p.code !== login.country) {
await incrementPlaylistCounter()
const logindata = await crunchyLogin(account.username, account.password, p.code)

View File

@ -145,7 +145,7 @@ async function fetchAndPipe(url: string, stream: fs.WriteStream, index: number,
section: 'audiofragmentCrunchyrollFetch'
})
console.error(`Retrying fragment ${index} due to error:`, error)
await new Promise(resolve => setTimeout(resolve, 1000))
await new Promise((resolve) => setTimeout(resolve, 1000))
}
}