Changed default cacheDuration, it matches variable
This commit is contained in:
parent
675c55bb1b
commit
8dd4dce08b
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -25,7 +25,7 @@ function formatBytes(bytes, decimals = 2) {
|
|||
|
||||
fs.mkdirSync(path.join(__dirname, 'cached'))
|
||||
|
||||
const cacheDuration = 15 || process.env.CACHEDUR
|
||||
const cacheDuration = 30 || process.env.CACHEDUR
|
||||
|
||||
process.on('uncaughtException', (err, origin) => {
|
||||
fs.writeSync(
|
||||
|
@ -98,7 +98,7 @@ app.get("/getLink", async (req, res) => {
|
|||
}
|
||||
</style>
|
||||
`)
|
||||
res.write(`<p><a href="/download?path=${path.basename(file)}&filename=${filename}.${format}" target="_blank">Link to video download!</a> (Link is deleted after 15 minutes!)</p>`)
|
||||
res.write(`<p><a href="/download?path=${path.basename(file)}&filename=${filename}.${format}" target="_blank">Link to video download!</a> (Link is deleted after ${cacheDuration} minutes!)</p>`)
|
||||
setTimeout(()=>{
|
||||
if (fs.existsSync(ytpath)) {
|
||||
fs.unlinkSync(ytpath)
|
||||
|
|
Loading…
Reference in a new issue