From c5ac70d31717162b89c2a4383a6ed81a02295710 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Thu, 23 Nov 2023 01:37:09 +0900 Subject: [PATCH] --download=url --- main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.ts b/main.ts index f6a28df..1dd8591 100644 --- a/main.ts +++ b/main.ts @@ -110,6 +110,10 @@ const options = { if (args.values.download === "all") { books.push(...(await library.getBooks())); } else { + if (URL.canParse(args.values.download!)) { + await library.add(args.values.download!); + } + const book = await library.get(Number(args.values.download!)); if (!book) {