ani-cli-npm 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +9 -4
- package/package.json +1 -1
package/bin/index.js
CHANGED
@@ -90,8 +90,9 @@ async function config_(temp){
|
|
90
90
|
console.log(colors.Cyan, `1) Player; ${temp.player}`)
|
91
91
|
console.log(colors.Cyan, `2) Proxy; ${temp.proxy}`)
|
92
92
|
console.log(colors.Cyan, `3) User agent; ${temp.user_agent}`)
|
93
|
-
console.log(colors.Cyan,
|
94
|
-
console.log(colors.Cyan, "5)
|
93
|
+
console.log(colors.Cyan, `4) Download folder; ${config.download_folder}`)
|
94
|
+
console.log(colors.Cyan, "5) Save and exit")
|
95
|
+
console.log(colors.Cyan, "6) Exit without saving changes")
|
95
96
|
let choice = parseInt(await input(""));
|
96
97
|
switch (choice){
|
97
98
|
case 1:
|
@@ -118,8 +119,11 @@ async function config_(temp){
|
|
118
119
|
temp.user_agent = await(input("New User agent;"))
|
119
120
|
return temp, 0
|
120
121
|
case 4:
|
121
|
-
|
122
|
+
temp.download_folder = await(input("New download folder: "))
|
123
|
+
return temp, 0
|
122
124
|
case 5:
|
125
|
+
return temp, 1
|
126
|
+
case 6:
|
123
127
|
return temp, 2
|
124
128
|
}
|
125
129
|
}
|
@@ -372,6 +376,7 @@ async function post_play(link, anime, player = null){
|
|
372
376
|
case "4":
|
373
377
|
console.log(colors.Yellow, "Beware of the dysfunctional await clause.")
|
374
378
|
await download(link, anime.anime_id+(anime.episode_number+1)+".mp4")
|
379
|
+
post_play(link, anime, player)
|
375
380
|
break
|
376
381
|
case "q":
|
377
382
|
case "5":
|
@@ -520,7 +525,7 @@ async function main(){
|
|
520
525
|
}
|
521
526
|
console.log(colors.Cyan, "3/C) Config")
|
522
527
|
console.log(colors.Cyan, "4/q) Quit")
|
523
|
-
let choice = await selection(
|
528
|
+
let choice = await selection(4, "select;", ["s", "c", "C", "q"])
|
524
529
|
switch (choice){
|
525
530
|
case "s":
|
526
531
|
case "1":
|