Ensure library.xml is setup
Publish Library / Build NPM Project (push) Successful in 21s
Publish Library / Tag Version (push) Successful in 11s

This commit is contained in:
2026-08-26 18:41:15 -04:00
parent 57cb9c8bd1
commit 0f8637f913
3 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -90,9 +90,9 @@ export class ZimManager {
/** Downloads/updates a single ZIM by direct href, matching against any existing local copy by name. */
async download(href, {force = false} = {}) {
await fs.promises.mkdir(this.#dir, {recursive: true});
const {url: finalUrl} = await this.#resolveUrl(href);
const filename = path.basename(new URL(finalUrl).pathname).replace(/\.meta4$/i, '');
await fs.promises.mkdir(this.#dir, {recursive: true});
const name = filename.replace(/\.zim$/i, '').replace(/_\d{4}-\d{2}(?:_\d+)?$/, '');
const local = await this.list();