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.
Unified · Split
| @@ -211,6 +211,12 @@ function scan_dir(path, current_file, dir_mode, separator, dir_depth, total_file · 210 unmodified lines | ||
| 211 | 211 | end |
| 212 | 212 | |
| 213 | 213 | function find_and_add_entries() |
| 214 | + local aborted = mp.get_property_native("playback-abort") | |
| 215 | + if aborted then | |
| 216 | + msg.debug("stopping: playback aborted") | |
| 217 | + return | |
| 218 | + end | |
| 219 | + | |
| 214 | 220 | local path = mp.get_property("path", "") |
| 215 | 221 | local dir, filename = utils.split_path(path) |
| 216 | 222 | msg.trace(("dir: %s, filename: %s"):format(dir, filename)) |