Fix format not found [Pinterest]
This commit is contained in:
parent
9bb6a5501e
commit
19cf9633b1
2 changed files with 3 additions and 17 deletions
|
@ -12,8 +12,6 @@ class Pinterest extends Ytdlp {
|
|||
const p = spawn(
|
||||
[
|
||||
"yt-dlp",
|
||||
"-f",
|
||||
"bv+ba",
|
||||
"-o",
|
||||
outPath,
|
||||
"--downloader",
|
||||
|
|
|
@ -34,16 +34,8 @@ class Youtube extends Ytdlp {
|
|||
if (filesize !== "unknown") {
|
||||
filesizeInMB = parseFloat(filesize);
|
||||
}
|
||||
if (
|
||||
id &&
|
||||
quality !== "unknown" &&
|
||||
filesize !== "unknown" &&
|
||||
filesizeInMB < 1500
|
||||
) {
|
||||
if (
|
||||
!qualitys.has(quality) ||
|
||||
filesizeInMB < parseFloat(qualitys.get(quality)!.filesize)
|
||||
) {
|
||||
if (id && quality !== "unknown" && filesize !== "unknown" && filesizeInMB < 1500) {
|
||||
if (!qualitys.has(quality) || filesizeInMB < parseFloat(qualitys.get(quality)!.filesize)) {
|
||||
qualitys.set(quality, { id, quality, filesize });
|
||||
}
|
||||
}
|
||||
|
@ -52,11 +44,7 @@ class Youtube extends Ytdlp {
|
|||
}
|
||||
|
||||
async downloadVideo(formatId: string) {
|
||||
const outPath = join(
|
||||
rootPath(),
|
||||
"downloads",
|
||||
`%(title).50s-%(format_id)s.%(ext)s`
|
||||
);
|
||||
const outPath = join(rootPath(), "downloads", `%(title).50s-%(format_id)s.%(ext)s`);
|
||||
this.status = "ACTIVE";
|
||||
const p = spawn(
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue