Merge pull request 'Update README.md' (#3) from dev into main
Reviewed-on: https://codeberg.orgBingus_Violet/Univerter#3
This commit is contained in:
commit
6bff74de37
2 changed files with 7 additions and 2 deletions
|
@ -51,6 +51,13 @@ npm start
|
|||
# Environment Variables
|
||||
|
||||
`PORT`= [Preffered Port] (8080 if unspecified)
|
||||
`MAX_FILESIZE` = [Max file size in MB] (Only applies to 1080p>, don't rely on this feature yet though, as it is unfinished.)
|
||||
|
||||
# To-Do
|
||||
- [ ] Properly cleanup unnessacary values
|
||||
- [ ] Option to disable 1080p+
|
||||
- [ ] Option to disable Conversion
|
||||
- [ ] Proper config
|
||||
|
||||
# Instances
|
||||
Here is a list of all currently public instances. If you want to add your instance to this list, please make an issue or pull request!
|
||||
|
|
2
index.js
2
index.js
|
@ -21,7 +21,6 @@ app.get("/convert", async (req, res) => {
|
|||
|
||||
var filePath = path.join(__dirname, 'downloads', file)
|
||||
|
||||
console.log(filePath)
|
||||
if (fs.existsSync(filePath)) {
|
||||
var ytdlpProcess = cp.spawnSync('yt-dlp', ['--get-filename', url])
|
||||
var name = ytdlpProcess.stdout.toString()
|
||||
|
@ -60,7 +59,6 @@ app.get("/download", async (req, res) => {
|
|||
res.setHeader("X-Accel-Buffering", "no")
|
||||
|
||||
var fileName = Math.ceil(Math.random() * 100_000_000_000).toString()
|
||||
console.log(fileName)
|
||||
var videoName = cp.spawnSync('yt-dlp', ['-S', 'res:' + quality, '--get-filename', url]).stdout.toString()
|
||||
|
||||
videoName = videoName.substring(0, videoName.lastIndexOf('.'))
|
||||
|
|
Loading…
Reference in a new issue