generated from ztimson/template
Fix name
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/zim-utils",
|
"name": "@ztimson/zim-utils",
|
||||||
"version": "0.4.12",
|
"version": "0.4.13",
|
||||||
"description": "Native, dependency-light ZIM archive reader/searcher and Kiwix catalog downloader for Node.js",
|
"description": "Native, dependency-light ZIM archive reader/searcher and Kiwix catalog downloader for Node.js",
|
||||||
"author": "Zak Timson",
|
"author": "Zak Timson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
+2
-2
@@ -131,7 +131,7 @@ export class ZimManager {
|
|||||||
async catalog(search, opts = {}) {
|
async catalog(search, opts = {}) {
|
||||||
const results = await zimCatalog(search, {url: this.#catalogUrl, ...opts});
|
const results = await zimCatalog(search, {url: this.#catalogUrl, ...opts});
|
||||||
return results.map(entry => this.#active[entry.href]
|
return results.map(entry => this.#active[entry.href]
|
||||||
? {...entry, ...this.#active[entry.href].dl.meta, downloading: true}
|
? {...this.#active[entry.href].dl.meta, ...entry, downloading: true}
|
||||||
: entry);
|
: entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ export class ZimManager {
|
|||||||
const localNames = new Set(local.map(l => l.name));
|
const localNames = new Set(local.map(l => l.name));
|
||||||
const pending = Object.values(this.#active)
|
const pending = Object.values(this.#active)
|
||||||
.filter(({entry}) => !localNames.has(entry.name))
|
.filter(({entry}) => !localNames.has(entry.name))
|
||||||
.map(({entry, dl}) => ({...entry, ...dl.meta, downloading: true}));
|
.map(({entry, dl}) => ({...dl.meta, ...entry, downloading: true}));
|
||||||
return [...local, ...pending];
|
return [...local, ...pending];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user