Fix subtitles margins

This commit is contained in:
Meivyn 2024-06-21 14:47:49 -04:00 committed by GitHub
parent fdf76f1ef1
commit ab7c77d273
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,6 +58,12 @@ export async function downloadCRSub(
(s.MarginV = String(Math.round((parseInt(s.MarginV) / parseInt(parsedASS.info.PlayResY)) * qualY)))
}
for (const s of parsedASS.events.dialogue) {
;(s.MarginL = Math.round((s.MarginL / parseInt(parsedASS.info.PlayResY)) * qualY)),
(s.MarginR = Math.round((s.MarginR / parseInt(parsedASS.info.PlayResY)) * qualY)),
(s.MarginV = Math.round((s.MarginV / parseInt(parsedASS.info.PlayResY)) * qualY))
}
parsedASS.info.PlayResX = String(qualX)
parsedASS.info.PlayResY = String(qualY)