-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
36 lines (29 loc) · 1023 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import dotenv from 'dotenv';
import getGenreMap from './src/lib/genreMap.js';
dotenv.config();
/*
*
* First access folder and get list of folder file names
* Get folder file names as string and get movie name out of it
* Use IMDB or some other API to get genre of the movie from API response
* Use this genre string to create a directory/or if already exists put movie inside that folder
*
* In case of complicated genre title (like docu-horror, horror-comedy etc.)
* then
* choose the higher priority genre, for example horror in case of docu-horror (use some algorithm for this prioritization).
* create chosen genre name's folder or if existing put movie inside that folder
*
*
*
*
* Regex - /(.720p|.1080p|.480p|.360p|.240p)\S+/g
* White.Noise.2020.360p.WEBRip.800MB.x264-GalaxyRG[TGx] --> (Output) -->.360p.WEBRip.800MB.x264-GalaxyRG[TGx]
*
*
*
*/
const args = process.argv;
const main = () => {
getGenreMap();
}
main();