--download=url

This commit is contained in:
Nebel 2023-11-23 01:37:09 +09:00
parent 14cc02f9de
commit c5ac70d317
Signed by: nebel
GPG key ID: 79807D08C6EF6460

View file

@ -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) {