Match lua's 8e5642ff
Unified · Split
| @@ -561,9 +561,10 @@ static void script__request_event(js_State *J) · 560 unmodified lines | ||
| 561 | 561 | static void script_enable_messages(js_State *J) |
| 562 | 562 | { |
| 563 | 563 | const char *level = js_tostring(J, 1); |
| 564 | − if (mp_msg_find_level(level) < 0) | |
| 564 | + int e = mpv_request_log_messages(jclient(J), level); | |
| 565 | + if (e == MPV_ERROR_INVALID_PARAMETER) | |
| 565 | 566 | js_error(J, "Invalid log level '%s'", level); |
| 566 | − push_status(J, mpv_request_log_messages(jclient(J), level)); | |
| 567 | + push_status(J, e); | |
| 567 | 568 | } |
| 568 | 569 | |
| 569 | 570 | // args - command [with arguments] as string |