mirror of
https://github.com/mpv-player/mpv
synced 2025-01-23 16:13:39 +00:00
TOOLS/lua/autoload: skip loading when playback is aborted
Quickly going through a directory with too many loadable files causes the autoload tasks to pile up and exiting the player will take forever. Avoid this by skipping loading when playback is aborted.
This commit is contained in:
parent
3881dc37c5
commit
b1491bed28
@ -211,6 +211,12 @@ function scan_dir(path, current_file, dir_mode, separator, dir_depth, total_file
|
||||
end
|
||||
|
||||
function find_and_add_entries()
|
||||
local aborted = mp.get_property_native("playback-abort")
|
||||
if aborted then
|
||||
msg.debug("stopping: playback aborted")
|
||||
return
|
||||
end
|
||||
|
||||
local path = mp.get_property("path", "")
|
||||
local dir, filename = utils.split_path(path)
|
||||
msg.trace(("dir: %s, filename: %s"):format(dir, filename))
|
||||
|
Loading…
Reference in New Issue
Block a user