Merge pull request #24 from Meivyn/fix-margins

Fix subtitles margins
This commit is contained in:
Stratum 2024-06-21 20:59:04 +02:00 committed by GitHub
commit f5e6f13fd3
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)