fix: handle mpv end-file errors with global snackbar

This commit is contained in:
edde746
2026-03-11 09:29:16 +01:00
parent 580c1d82e5
commit 3c491be690
7 changed files with 68 additions and 13 deletions
+2
View File
@@ -532,6 +532,8 @@ void MpvPlayer::HandleMpvEvent(mpv_event* event) {
if (end->reason == MPV_END_FILE_REASON_ERROR) {
fl_value_set_string_take(data, "error",
fl_value_new_int(static_cast<int>(end->error)));
fl_value_set_string_take(data, "message",
fl_value_new_string(SanitizeUtf8(mpv_error_string(end->error)).c_str()));
}
SendEvent("end-file", data);
fl_value_unref(data);