History

js: don't pre-filter log level argument in mp.enable_messages()

Match lua's 8e5642ff

Avi Halachmi (:avih) committed 6 years ago

Commit eb033bc1 parent 521535c1 file · +3 −2Browse files

Unified · Split

player/javascript.c+3−2
@@ -561,9 +561,10 @@ static void script__request_event(js_State *J) · 560 unmodified lines
561static void script_enable_messages(js_State *J)561static void script_enable_messages(js_State *J)
562{562{
563 const char *level = js_tostring(J, 1);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 js_error(J, "Invalid log level '%s'", level);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// args - command [with arguments] as string570// args - command [with arguments] as string

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t