1080p because I am sick of counting pixels
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 25s
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 25s
This commit is contained in:
parent
177e184621
commit
4b78b70ede
|
@ -57,7 +57,7 @@ export default async bot => {
|
||||||
// read metadata
|
// read metadata
|
||||||
let ext;
|
let ext;
|
||||||
try {
|
try {
|
||||||
const meta = JSON.parse((await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout);
|
const meta = JSON.parse((await queue.exec(`yt-dlp -f 'bv*[height<=1080]+ba/b[height<=1080] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout);
|
||||||
ext = meta.ext;
|
ext = meta.ext;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
|
const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"];
|
||||||
|
@ -77,7 +77,7 @@ export default async bot => {
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
let source;
|
let source;
|
||||||
try {
|
try {
|
||||||
source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
|
source = (await queue.exec(`yt-dlp -f 'bv*[height<=1080]+ba/b[height<=1080] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
if(e.type == 'tg')
|
if(e.type == 'tg')
|
||||||
return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "something went wrong lol");
|
return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "something went wrong lol");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user