ani-cli-npm 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/bin/index.js +9 -4
  2. 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, "4) Save and exit")
94
- console.log(colors.Cyan, "5) Exit without saving changes")
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
- return temp, 1
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(3, "select;", ["s", "c", "C", "q"])
528
+ let choice = await selection(4, "select;", ["s", "c", "C", "q"])
524
529
  switch (choice){
525
530
  case "s":
526
531
  case "1":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ani-cli-npm",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "ani-cli tool rewritten as npm package",
5
5
  "main": "index.js",
6
6
  "scripts": {