[skip ci] Add url to error report

This commit is contained in:
Brahim Hadriche committed 2025-09-06 11:56:30 -04:00
1 parent e1c8b5284f
commit 0ddd3cf0e2
1 file changed
+4 -4
@@ -447,7 +447,7 @@ function OnVideoPlayerStateChange() as void
errorData = GetPlayerErrorData(content.videoId, errorInfo)
LogErrorNoTelemetry(errorData.title, errorData.body)
ReportVideoError(errorData)
ReportVideoError(errorData, content.url)
errorReported = true
if m.videoPlayingSuccess <> true
@@ -499,7 +499,7 @@ function OnVideoPlayerStateChange() as void
LogErrorNoTelemetry(errorData.title, errorData.body)
if not errorReported
ReportVideoError(errorData)
ReportVideoError(errorData, content.url)
end if
buttons = [Tr(Locale.Buttons.PlayNextVideo), Tr(Locale.Buttons.Cancel)]
@@ -547,7 +547,7 @@ function GetPlayerErrorData(videoId as string, errorInfo as object) as object
}
end function
function ReportVideoError(errorData as object) as void
function ReportVideoError(errorData as object, url as string) as void
attachments = invalid
if errorData.body.Instr("malformed data") <> -1 or errorData.body.Instr("invalid pathname") <> -1
lastGeneratedDash = ReadAsciiFile("tmp:/last_generated_dash.xml")
@@ -573,7 +573,7 @@ function ReportVideoError(errorData as object) as void
m.global.telemetry.LogEvent = {
level: "error"
message: errorData.title + " " + errorData.body
message: errorData.title + " " + errorData.body + `\n url: ${url}`
fingerprint: errorData.fingerprint
attachments: attachments
}