ani-cli-npm 1.4.3 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/temp" />
6
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+ </content>
9
+ <orderEntry type="inheritedJdk" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ </component>
12
12
  </module>
package/.idea/discord.xml CHANGED
@@ -1,7 +1,7 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="DiscordProjectSettings">
4
- <option name="show" value="ASK" />
5
- <option name="description" value="" />
6
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="DiscordProjectSettings">
4
+ <option name="show" value="ASK" />
5
+ <option name="description" value="" />
6
+ </component>
7
7
  </project>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GitToolBoxProjectSettings">
4
+ <option name="commitMessageIssueKeyValidationOverride">
5
+ <BoolValueOverride>
6
+ <option name="enabled" value="true" />
7
+ </BoolValueOverride>
8
+ </option>
9
+ <option name="commitMessageValidationEnabledOverride">
10
+ <BoolValueOverride>
11
+ <option name="enabled" value="true" />
12
+ </BoolValueOverride>
13
+ </option>
14
+ </component>
15
+ </project>
@@ -0,0 +1,10 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
5
+ <Languages>
6
+ <language minSize="76" name="JavaScript" />
7
+ </Languages>
8
+ </inspection_tool>
9
+ </profile>
10
+ </component>
@@ -1,6 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JavaScriptLibraryMappings">
4
- <includedPredefinedLibrary name="Node.js Core" />
5
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptLibraryMappings">
4
+ <includedPredefinedLibrary name="Node.js Core" />
5
+ </component>
6
6
  </project>
package/.idea/modules.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/ani-cli-npm.iml" filepath="$PROJECT_DIR$/.idea/ani-cli-npm.iml" />
6
- </modules>
7
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/ani-cli-npm.iml" filepath="$PROJECT_DIR$/.idea/ani-cli-npm.iml" />
6
+ </modules>
7
+ </component>
8
8
  </project>
package/.idea/vcs.xml CHANGED
@@ -1,6 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
6
  </project>
package/README.MD CHANGED
@@ -1,70 +1,72 @@
1
- # ANI-CLI-NPM
2
-
3
- ### An Anime client, writen in nodeJS, to access any* anime without the need for ad filled websites! Just install, search for the anime of your choice, and watch in the video player of your choice.
4
- ### NodeJS rewrite of the [ani-cli](https://github.com/pystardust/ani-cli) package for linux.
5
-
6
-
7
- ## Instalation:
8
- ### Windows:
9
- #### - Download and install [nodejs](https://nodejs.org/en/download/)
10
- #### - Open a terminal or powershell and run the following command to run the program:
11
- ```
12
- npx ani-cli-npm@latest
13
- ```
14
- #### - It is recomended to install VLC media player, but optionaly you can change your video player to Browser in config
15
-
16
- ### Android
17
- #### - Install the android terminal of your choice. e.g. [Termux](https://play.google.com/store/apps/details?id=com.termux)
18
- #### - Install [nodejs](https://nodejs.org/). In termux this is done with the following command:
19
- ```
20
- pkg install nodejs
21
- ```
22
- #### - Run
23
- ```
24
- npx ani-cli-npm@latest
25
- ```
26
- ##### Note: At preset (1.0.6), you will need to change the player to browser, and will have to do any downloads through your browser of choice.
27
-
28
- ### Linux:
29
- #### - Install [nodejs](https://nodejs.org/en/download/ with your distrabutions package manager.
30
- #### - Run the following command:
31
- ```
32
- npx ani-cli-npm@latest
33
- ```
34
- ##### Note: If you are using linux, I would advise just using the origonal [ani-cli](https://github.com/pystardust/ani-cli), the main perpous of this package is to allow easier use on windows and android.
35
-
36
-
37
- ## Usage:
38
- <img width="147" alt="image" src="https://user-images.githubusercontent.com/74017165/195988816-5088cbff-348e-4852-a1a0-ef343785d488.png">
39
-
40
- #### Input the page you wish to got to then press the enter key to select
41
-
42
- ### Search:
43
-
44
- #### Input the name of the anime you want to watch, the select an anime from the search results. Then select the episode you wish to watch (If there is only one episode, said ep will be played automaticly)
45
-
46
- #### Play - Plays the episode you have chosen in the player you have selected in config (VLC by default)
47
-
48
- #### Download - Will download the episode. (This requires you to have chosed a download directory in config).
49
-
50
- ##### The download feature is not currently implemented, if you wish to download, open in browser and download there.
51
-
52
- #### Show Link - Will display the link to the video file. This can be opened in a video player or browser.
53
-
54
- ### Config:
55
-
56
- #### For configuring several of options about how the program works.
57
-
58
- #### Player - Change which player is used to open the anime (default mpv).
59
-
60
- #### Proxy - Proxy used for searching. This is not currently implemented and will not work.
61
-
62
- #### User agent - The user agent used to make requests to websites.
63
-
64
-
65
- ## Current limitations:
66
-
67
-
68
- ### This project is still somewhat under development, as such, there are a few bugs you may run into. Feel free to open an issue on github, though there is a solid chance I am aware of it and just havn't gotten round to fixing it yet.
69
-
70
- ## Happy watching :)
1
+ # ANI-CLI-NPM
2
+
3
+ ### An Anime client, writen in nodeJS, to access any* anime without the need for ad filled websites! Just install, search for the anime of your choice, and watch in the video player of your choice.
4
+ ### Typescript rewrite of the [ani-cli](https://github.com/pystardust/ani-cli) package for linux.
5
+
6
+
7
+ ## Instalation:
8
+ ### Windows:
9
+ #### - Download and install [nodejs](https://nodejs.org/en/download/)
10
+ #### - Open a terminal or powershell and run the following command to run the program:
11
+ ```
12
+ npx ani-cli-npm@latest
13
+ ```
14
+ #### - It is recomended to install VLC media player, but optionaly you can change your video player to Browser in config
15
+
16
+ ### Android
17
+ #### - Install the android terminal of your choice. e.g. [Termux](https://play.google.com/store/apps/details?id=com.termux)
18
+ #### - Install [nodejs](https://nodejs.org/). In termux this is done with the following command:
19
+ ```
20
+ pkg install nodejs
21
+ ```
22
+ #### - Run
23
+ ```
24
+ npx ani-cli-npm@latest
25
+ ```
26
+ ##### Note: At preset (1.0.6), you will need to change the player to browser, and will have to do any downloads through your browser of choice.
27
+
28
+ ### Linux:
29
+ #### - Install [nodejs](https://nodejs.org/en/download/ with your distrabutions package manager.
30
+ #### - Run the following command:
31
+ ```
32
+ npx ani-cli-npm@latest
33
+ ```
34
+
35
+ ### Build from git:
36
+ ```
37
+ git clone https://github.com/Bumpkin-Pi/ani-cli-npm.git
38
+ cd ani-cli-npm
39
+ npm run build
40
+ npm run start
41
+ ```
42
+
43
+
44
+ ## Usage:
45
+ ![image](https://user-images.githubusercontent.com/74017165/204142452-485e31b5-68dc-4eea-9924-bfb040429b02.png)
46
+
47
+
48
+
49
+ #### Input the page you wish to got to then press the enter key to select
50
+
51
+ ### Search: Input the name of the anime you want to watch, the select an anime from the search results. Then select the episode you wish to watch (If there is only one episode, said ep will be played automaticly)
52
+
53
+ ### Download - Download either a single episode, or a range of episodes from an anime of your choice. Download folder can be changed in options.
54
+
55
+ ##### The download feature is not currently implemented, if you wish to download, open in browser and download there.
56
+
57
+ #### Show Link - Will display the link to the video file. This can be opened in a video player or browser.
58
+
59
+ ### Options:
60
+
61
+ #### For configuring several of options about how the program works.
62
+
63
+ #### Player - Change which player is used to open the anime (default browser).
64
+
65
+ #### Proxy - Proxy used for searching. This is not currently implemented and will not work.
66
+
67
+ #### User agent - The user agent used to make requests to websites.
68
+
69
+ #### Download folder - The folder in which to download episodes.
70
+
71
+
72
+ ## Happy watching :)
package/bin/Anime.js ADDED
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Anime = void 0;
4
+ const curl_1 = require("./curl");
5
+ const regex_1 = require("./regex");
6
+ const generate_link_1 = require("./generate_link");
7
+ const cache_1 = require("./cache");
8
+ const input_1 = require("./input");
9
+ const load_config_1 = require("./load_config");
10
+ const open = require("open");
11
+ const PlayerController = require("media-player-controller");
12
+ const dl = require("download-file-with-progressbar");
13
+ const chalk = require("chalk");
14
+ // const gogohd_url="https://gogohd.net/"
15
+ const base_url = "https://animixplay.to";
16
+ class Anime {
17
+ id = "";
18
+ episode_list = [];
19
+ player = 0;
20
+ async init(anime_id, cache_folder) {
21
+ let cache_object = (0, cache_1.search_cache)(cache_folder, anime_id);
22
+ this.id = anime_id;
23
+ if (cache_object == 0) {
24
+ await this.get_ap_bases(anime_id);
25
+ }
26
+ else {
27
+ try {
28
+ this.episode_list = cache_object.episode_list;
29
+ }
30
+ catch {
31
+ await this.get_ap_bases(anime_id);
32
+ }
33
+ }
34
+ return 0;
35
+ }
36
+ async get_episode_link(episode, player = "VLC") {
37
+ let episode_dpage = this.episode_list[episode];
38
+ let id = episode_dpage.replace("//gogohd.net/streaming.php?id=", "");
39
+ id = id.slice(0, id.indexOf("="));
40
+ let link = await (0, generate_link_1.generate_link)(1, id, player);
41
+ if (!link) {
42
+ link = await (0, generate_link_1.generate_link)(2, id, player);
43
+ }
44
+ if (!link) {
45
+ console.log(chalk.red("Failed to generate links"));
46
+ }
47
+ if (player == "VLC" && link.includes("m3u8")) {
48
+ console.log(chalk.red("Warning; VLC is not compatible with m3u8 playlist files without custom plugins."));
49
+ }
50
+ return link;
51
+ }
52
+ async get_ap_bases(anime_id) {
53
+ let html = (await ((0, curl_1.curl)(base_url + "/v1/" + anime_id))).split("\n");
54
+ let lines = "";
55
+ for (let x in html) {
56
+ if ((0, regex_1.RegexParse)(html[x], "*<div id=\"epslistplace\"*")) {
57
+ lines = (html[x]);
58
+ }
59
+ }
60
+ lines = lines.slice(55, lines.length).replace("}</div>", "");
61
+ lines = "{" + lines.slice(lines.indexOf(",") + 1, lines.length) + "}";
62
+ let json = JSON.parse(lines);
63
+ for (const value of Object.entries(json)) {
64
+ this.episode_list.push(value[1]);
65
+ }
66
+ }
67
+ async play_head(episode, config, config_dir) {
68
+ console.clear();
69
+ console.log(`Playing ${this.id} episode ${episode + 1}`);
70
+ switch (config.player) {
71
+ case "MPV":
72
+ console.log(("Opening MPV.."));
73
+ this.player = await new PlayerController({
74
+ app: 'mpv',
75
+ args: ['--fullscreen'],
76
+ media: await this.get_episode_link(episode, config.player)
77
+ });
78
+ // @ts-ignore
79
+ await this.player.launch(err => {
80
+ if (err)
81
+ return console.error(err.message);
82
+ });
83
+ break;
84
+ case "VLC":
85
+ console.log(("Opening VLC.."));
86
+ this.player = await new PlayerController({
87
+ app: 'vlc',
88
+ args: ['--fullscreen'],
89
+ media: await this.get_episode_link(episode, config.player)
90
+ });
91
+ // @ts-ignore
92
+ await this.player.launch(err => {
93
+ if (err)
94
+ return console.error(err.message);
95
+ });
96
+ break;
97
+ case "BROWSER":
98
+ console.log(("Opening browser..."));
99
+ await open(await this.get_episode_link(episode, config.player));
100
+ break;
101
+ case "LINK":
102
+ this.player = 1;
103
+ console.log(await this.get_episode_link(episode, config.player));
104
+ break;
105
+ }
106
+ config.most_recent.anime_id = this.id;
107
+ config.most_recent.episode_number = episode;
108
+ (0, load_config_1.write_config)(config_dir, config);
109
+ if (episode <= 0) {
110
+ switch (await (0, input_1.selection)([
111
+ "Next",
112
+ "Quit"
113
+ ], ["n", "q"])) {
114
+ case 0:
115
+ await this.play(episode + 1, config, config_dir);
116
+ break;
117
+ case 1:
118
+ break;
119
+ }
120
+ }
121
+ else if (episode >= this.episode_list.length - 1) {
122
+ switch (await (0, input_1.selection)([
123
+ "Previous",
124
+ "Quit"
125
+ ], ["p", "q"])) {
126
+ case 0:
127
+ await this.play(episode - 1, config, config_dir);
128
+ break;
129
+ case 1:
130
+ break;
131
+ }
132
+ }
133
+ else {
134
+ switch (await (0, input_1.selection)([
135
+ "Next",
136
+ "Previous",
137
+ "Quit"
138
+ ], ["n", "p", "q"])) {
139
+ case 0:
140
+ await this.play(episode + 1, config, config_dir);
141
+ break;
142
+ case 1:
143
+ await this.play(episode - 1, config, config_dir);
144
+ break;
145
+ case 2:
146
+ break;
147
+ }
148
+ }
149
+ }
150
+ async play(episode, config, config_dir) {
151
+ console.clear();
152
+ console.log(`Playing ${this.id} episode ${episode + 1}`);
153
+ if (this.player == 0) {
154
+ await open(await this.get_episode_link(episode, "BROWSER"));
155
+ }
156
+ else if (this.player == 1) {
157
+ console.log(await this.get_episode_link(episode));
158
+ }
159
+ else if (this.player.opts.app == "mpv") {
160
+ await this.player.load(await this.get_episode_link(episode));
161
+ }
162
+ else {
163
+ this.player.quit();
164
+ this.player = await new PlayerController({
165
+ app: 'vlc',
166
+ args: ['--fullscreen'],
167
+ media: await this.get_episode_link(episode, config.player)
168
+ });
169
+ // @ts-ignore
170
+ await this.player.launch(err => {
171
+ if (err)
172
+ return console.error(err.message);
173
+ });
174
+ }
175
+ config.most_recent.anime_id = this.id;
176
+ config.most_recent.episode_number = episode;
177
+ (0, load_config_1.write_config)(config_dir, config);
178
+ if (episode <= 0) {
179
+ switch (await (0, input_1.selection)([
180
+ "Next",
181
+ "Quit"
182
+ ], ["n", "q"])) {
183
+ case 0:
184
+ await this.play(episode + 1, config, config_dir);
185
+ break;
186
+ case 1:
187
+ break;
188
+ }
189
+ }
190
+ else if (episode >= this.episode_list.length - 1) {
191
+ switch (await (0, input_1.selection)([
192
+ "Previous",
193
+ "Quit"
194
+ ], ["p", "q"])) {
195
+ case 0:
196
+ await this.play(episode - 1, config, config_dir);
197
+ break;
198
+ case 1:
199
+ break;
200
+ }
201
+ }
202
+ else {
203
+ switch (await (0, input_1.selection)([
204
+ "Next",
205
+ "Previous",
206
+ "Quit"
207
+ ], ["n", "p", "q"])) {
208
+ case 0:
209
+ await this.play(episode + 1, config, config_dir);
210
+ break;
211
+ case 1:
212
+ await this.play(episode - 1, config, config_dir);
213
+ break;
214
+ case 2:
215
+ break;
216
+ }
217
+ }
218
+ }
219
+ async download(episode, download_folder) {
220
+ // @ts-ignore
221
+ let ep_link = await this.get_episode_link(episode);
222
+ let file_name = `${this.id}-${episode + 1}.mp4`;
223
+ if (ep_link.includes(".m3u8"))
224
+ console.log(chalk.red("Warning: Animixplay will download an m3u8 file. This will require some extra steps to play. It is advised to use a 3rd party website or tool to download these from the link."));
225
+ // @ts-ignore
226
+ let option = {
227
+ filename: ep_link.includes("m3u8") ? file_name.replace("mp4", "m3u8") : file_name,
228
+ dir: download_folder,
229
+ // @ts-ignore
230
+ onDone: (info) => {
231
+ // @ts-ignore
232
+ console.log(chalk.green(`\n -- Download finished -- \nLocation: ${info.path}. Size: ${Math.round(info.size / 100000) * 10} Bytes\n`) + ">");
233
+ return 0;
234
+ },
235
+ // @ts-ignore
236
+ onError: (err) => {
237
+ console.log(chalk.red('error', err));
238
+ },
239
+ // @ts-ignore
240
+ onProgress: (curr, total) => {
241
+ process.stdout.clearLine(0);
242
+ process.stdout.cursorTo(0);
243
+ process.stdout.write("\x1b[32m -- " + (curr / total * 100).toFixed(2) + "% " + "#".repeat(Math.ceil((curr / total) * ((process.stdout.columns - 20) / 1.5))) + "~".repeat(Math.ceil(((process.stdout.columns - 20) / 1.5) - (curr / total) * ((process.stdout.columns - 20) / 1.5))) + " -- \x1b[0m");
244
+ }
245
+ };
246
+ //console.log((`${option.dir}/${option.filename}`))
247
+ return await dl(ep_link, option);
248
+ }
249
+ async bulk_download(start_episode, end_episode, download_folder) {
250
+ let downloaders = [];
251
+ for (let episode = start_episode; episode <= end_episode; episode++) {
252
+ downloaders.push(await this.download(episode, download_folder));
253
+ }
254
+ return await Promise.all(downloaders);
255
+ }
256
+ }
257
+ exports.Anime = Anime;
package/bin/cache.js ADDED
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.search_cache = exports.new_cache = exports.clear_cache = void 0;
27
+ const fs = __importStar(require("fs"));
28
+ function clear_cache(location, show) {
29
+ try {
30
+ console.log("ye sorry that doesnt exist yet.");
31
+ if (show) {
32
+ console.log("Cleared cache");
33
+ }
34
+ }
35
+ catch {
36
+ if (show) {
37
+ console.log("Failed to clear cache.");
38
+ }
39
+ }
40
+ }
41
+ exports.clear_cache = clear_cache;
42
+ function new_cache(location, anime, show) {
43
+ try {
44
+ fs.writeFileSync(location + "/" + anime.id + ".cache", JSON.stringify(anime));
45
+ }
46
+ catch {
47
+ if (show) {
48
+ console.log("Failed to write to cache");
49
+ }
50
+ }
51
+ }
52
+ exports.new_cache = new_cache;
53
+ function get_cache(location, anime_id) {
54
+ return JSON.parse(fs.readFileSync(location + "/" + anime_id + ".cache").toString());
55
+ }
56
+ function search_cache(location, anime_id) {
57
+ try {
58
+ if (check_cache(location, anime_id)) {
59
+ return get_cache(location, anime_id);
60
+ }
61
+ return false;
62
+ }
63
+ catch {
64
+ return false;
65
+ }
66
+ }
67
+ exports.search_cache = search_cache;
68
+ function check_cache(location, anime_id) {
69
+ return fs.readdirSync(location).includes(anime_id + ".cache");
70
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.config_ = void 0;
4
+ const chalk = require("chalk");
5
+ const input_1 = require("./input");
6
+ async function config_(temp) {
7
+ console.clear();
8
+ console.log(chalk.blue("ANI-CLI-NPM \n"));
9
+ console.log(chalk.yellow("Config:\n"));
10
+ let choice = await (0, input_1.selection)([
11
+ "Player; " + temp.player,
12
+ "Proxy; " + temp.proxy,
13
+ "User agent; " + temp.user_agent,
14
+ "Downloads folder; " + temp.download_folder,
15
+ "Save and exit",
16
+ "Exit without saving"
17
+ ], [], ((item) => { return chalk.cyan(item); }), ((item) => { return chalk.cyan(item); }));
18
+ switch (choice) {
19
+ case 0:
20
+ let player = await (0, input_1.selection)([
21
+ "VLC - VLC media player",
22
+ "Browser - Play in default browser",
23
+ "MPV - MPV media player",
24
+ "Link - Simply display the link in console"
25
+ ], [], ((item) => { return chalk.cyan(item); }), ((item) => { return chalk.cyan(item); }));
26
+ switch (player) {
27
+ case 0:
28
+ temp.player = "VLC";
29
+ break;
30
+ case 1:
31
+ temp.player = "BROWSER";
32
+ break;
33
+ case 2:
34
+ temp.player = "MPV";
35
+ break;
36
+ case 3:
37
+ temp.player = "LINK";
38
+ break;
39
+ }
40
+ // @ts-ignore
41
+ return temp, 0;
42
+ case 1:
43
+ console.log(chalk.cyan("New Proxy;"));
44
+ temp.proxy = (await ((0, input_1.input)())).replaceAll(" ", "");
45
+ // @ts-ignore
46
+ return temp, 0;
47
+ case 2:
48
+ console.log(chalk.cyan("New User Agent"));
49
+ temp.user_agent = await ((0, input_1.input)());
50
+ // @ts-ignore
51
+ return temp, 0;
52
+ case 3:
53
+ console.log(chalk.cyan("New Downloads Folder"));
54
+ temp.download_folder = await ((0, input_1.input)());
55
+ // @ts-ignore
56
+ return temp, 0;
57
+ case 4:
58
+ // @ts-ignore
59
+ return temp, 1;
60
+ case 5:
61
+ // @ts-ignore
62
+ return temp, 2;
63
+ }
64
+ }
65
+ exports.config_ = config_;