mirror of https://github.com/mpv-player/mpv
lua: support MPV_END_FILE_REASON_REDIRECT
And also add the missing "unknown" entry to the manpage.
This commit is contained in:
parent
e53cb0890e
commit
0d2456ae5f
|
@ -707,6 +707,16 @@ List of events
|
|||
An error happened. In this case, an ``error`` field is present with
|
||||
the error string.
|
||||
|
||||
``redirect``
|
||||
Happens with playlists and similar. Details see
|
||||
``MPV_END_FILE_REASON_REDIRECT`` in the C API.
|
||||
|
||||
``unknown``
|
||||
Unknown. Normally doesn't happen, unless the Lua API is out of sync
|
||||
with the C API. (Likewise, it could happen that your script gets
|
||||
reason strings that did not exist yet at the time your script was
|
||||
written.)
|
||||
|
||||
``file-loaded``
|
||||
Happens after a file was loaded and begins playback.
|
||||
|
||||
|
|
|
@ -520,6 +520,7 @@ static int script_wait_event(lua_State *L)
|
|||
case MPV_END_FILE_REASON_STOP: reason = "stop"; break;
|
||||
case MPV_END_FILE_REASON_QUIT: reason = "quit"; break;
|
||||
case MPV_END_FILE_REASON_ERROR: reason = "error"; break;
|
||||
case MPV_END_FILE_REASON_REDIRECT: reason = "redirect"; break;
|
||||
default:
|
||||
reason = "unknown";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue