mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-05-17 11:01:54 +00:00
feat: show library entries when searching specific episode while offline
This commit is contained in:
parent
d611e4662d
commit
f9105e5433
2 changed files with 9 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ui",
|
"name": "ui",
|
||||||
"version": "6.4.7",
|
"version": "6.4.8",
|
||||||
"license": "BUSL-1.1",
|
"license": "BUSL-1.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@9.14.4",
|
"packageManager": "pnpm@9.14.4",
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,14 @@ export const extensions = new class Extensions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!navigator.onLine) {
|
||||||
|
const library = await native.library()
|
||||||
|
const entry = library.find(lib => lib.mediaID === media.id && lib.episode === episode)
|
||||||
|
if (entry) {
|
||||||
|
results.push({ accuracy: 'high', date: new Date(entry.date), downloads: 0, hash: entry.hash, extension: new Set(['local']), leechers: 0, link: entry.hash, seeders: 0, size: entry.size, title: entry.name ?? entry.hash, type: entry.files > 1 ? 'batch' : undefined, parseObject: {} as unknown as AnitomyResult })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
debug(`Found ${results.length} results`)
|
debug(`Found ${results.length} results`)
|
||||||
|
|
||||||
const deduped = this.dedupe(results)
|
const deduped = this.dedupe(results)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue