1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Don't send m3u8 containing non existing chunks

This commit is contained in:
Chocobozzz 2024-08-05 16:32:55 +02:00
parent 17cd564875
commit e7b9311e92
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 49 additions and 12 deletions

View file

@ -141,9 +141,20 @@ export function makeUploadRequest (options: CommonRequestParams & {
if (!value) return
if (Array.isArray(value)) {
req.attach(attach, buildAbsoluteFixturePath(value[0]), value[1])
req.attach(
attach,
value[0] instanceof Buffer
? value[0]
: buildAbsoluteFixturePath(value[0]),
value[1]
)
} else {
req.attach(attach, buildAbsoluteFixturePath(value))
req.attach(
attach,
value instanceof Buffer
? value
: buildAbsoluteFixturePath(value)
)
}
})