mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-01-12 00:03:44 +00:00
feat: re-introduce partial batches
This commit is contained in:
parent
36df9897cc
commit
89c337fe31
3 changed files with 12 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "6.4.72",
|
||||
"version": "6.4.73",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.15.5",
|
||||
|
|
|
|||
|
|
@ -196,13 +196,17 @@ export const extensions = new class Extensions {
|
|||
const extopts = get(extensionOptions)
|
||||
const configs = get(saved)
|
||||
|
||||
const checkMovie = !singleEp && movie
|
||||
const checkBatch = !singleEp && !movie
|
||||
|
||||
for (const [id, worker] of Object.entries(workers)) {
|
||||
if (!extopts[id]!.enabled) continue
|
||||
if (configs[id]!.type !== 'torrent') continue
|
||||
try {
|
||||
const promises: Array<Promise<TorrentResult[]>> = []
|
||||
promises.push(worker.single(options))
|
||||
if (!singleEp && (movie || media.status === 'FINISHED')) promises.push(movie ? worker.movie(options) : worker.batch(options))
|
||||
if (checkMovie) promises.push(worker.movie(options))
|
||||
if (checkBatch) promises.push(worker.batch(options))
|
||||
|
||||
for (const result of await Promise.allSettled(promises)) {
|
||||
if (result.status === 'fulfilled') {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@
|
|||
"typeAcquisition": {
|
||||
"enable": false
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
".svelte-kit",
|
||||
"build",
|
||||
"public"
|
||||
],
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue