--download=url
This commit is contained in:
parent
14cc02f9de
commit
c5ac70d317
1 changed files with 4 additions and 0 deletions
4
main.ts
4
main.ts
|
@ -110,6 +110,10 @@ const options = {
|
||||||
if (args.values.download === "all") {
|
if (args.values.download === "all") {
|
||||||
books.push(...(await library.getBooks()));
|
books.push(...(await library.getBooks()));
|
||||||
} else {
|
} else {
|
||||||
|
if (URL.canParse(args.values.download!)) {
|
||||||
|
await library.add(args.values.download!);
|
||||||
|
}
|
||||||
|
|
||||||
const book = await library.get(Number(args.values.download!));
|
const book = await library.get(Number(args.values.download!));
|
||||||
|
|
||||||
if (!book) {
|
if (!book) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue