diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:13:15 +0000 |
commit | bff6c10f6909412899de6ab7c902f96080905550 (patch) | |
tree | 616d06233c652837e0d36657306ed0c157821a9a /input/event.c | |
parent | Releasing progress-linux version 0.37.0-1~progress7.99u1. (diff) | |
download | mpv-bff6c10f6909412899de6ab7c902f96080905550.tar.xz mpv-bff6c10f6909412899de6ab7c902f96080905550.zip |
Merging upstream version 0.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'input/event.c')
-rw-r--r-- | input/event.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/input/event.c b/input/event.c index 266e029..6c1e004 100644 --- a/input/event.c +++ b/input/event.c @@ -37,6 +37,21 @@ void mp_event_drop_files(struct input_ctx *ictx, int num_files, char **files, }; mp_input_run_cmd(ictx, cmd); } + } else if (action == DND_INSERT_NEXT) { + /* To insert the entries in the correct order, we iterate over them + backwards */ + for (int i = num_files - 1; i >= 0; i--) { + const char *cmd[] = { + "osd-auto", + "loadfile", + files[i], + /* Since we're inserting in reverse, wait til the final item + is added to start playing */ + (i > 0) ? "insert-next" : "insert-next-play", + NULL + }; + mp_input_run_cmd(ictx, cmd); + } } else { for (int i = 0; i < num_files; i++) { const char *cmd[] = { |