mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-15 03:45:03 +02:00
Fix server crash when FantLab provider request times out #4410
This commit is contained in:
parent
6634ce8fd4
commit
9bf8d7de11
1 changed files with 5 additions and 3 deletions
|
@ -52,9 +52,7 @@ class FantLab {
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
|
||||||
return Promise.all(items.map(async (item) => await this.getWork(item, timeout))).then((resArray) => {
|
return Promise.all(items.map(async (item) => await this.getWork(item, timeout))).then((resArray) => resArray.filter(Boolean))
|
||||||
return resArray.filter((res) => res)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -83,6 +81,10 @@ class FantLab {
|
||||||
return null
|
return null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (!bookData) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return this.cleanBookData(bookData, timeout)
|
return this.cleanBookData(bookData, timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue