-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the option to append media to playback queue instead of playing media instantly #2166
Comments
I second this. It would remove half the motivation for a playlist gui. Currently, all but the simplest playlists (all files in same directory) are impossible to build except from the command line. |
How about making this use a modifier key? Normal dropping replaces, dropping with Shift pressed adds? |
Or, to make it a bit more intuitive, make the OSC show visual hints, e.g. so that depending on which part of the screen the files are dropped in, mpv will replace the playlist and start playing instantly, or add them to the current playlist, or something else… I may or may not be volunteering. Does the API expose something like a drag-enter event yet? |
No. |
now we are starting to escalate things a bit ... And this should probably also work without the OSC. |
So, what do you want? |
I think it would be sufficient to interpret drags into a window already playing something as enqueue. It could be an opt-in command line / config option if there is desire to maintain the old behaviour. |
I would like to see an append-play command for mpv directly (to be used via DnD on a .desktop launcher |
The command exists, it's just not used by the drop code. (Actually it does use it if multiple files are dropped: for each file a loadfile command is run, and only the first file wipes the previous playlist.) |
Wow, that was easy
On the other hand if this should not be the default behaviour, we need either a modifier key (+ modiified event) or an option. Opinions? |
I'd be fine without any further changes than that. The drawback might be that dragging files to a playing window gives no notification that the files were added to the play list. Should there be some sort of osd notification? |
above works fine here when mpv is started on a playlist or at least 2 files. So dumb ? of the month - is there anyway to have this work when mpv is opened on a single file? |
@mc4man I don't understand. Are you saying that the above doesn't work when mpv is started with |
Ok , re- checking, if starting with a single file it does 'work' - Ot - is there anyway to stop the 'spamming' when using -v from simple cursor movement in window? |
I see what you mean. So the OSC doesn't get updated by the drop event I guess. Looks like once the next file is loaded the arrows appear. There doesn't seem to be a documented event that the osc could listen to for this. |
adding to osc.lua
seems to cause the arrows to appear right away. |
So I see the following possibilities:
I don't like 2. input.conf is not flexible enough for this (unless you have a suggestion), and I'd like to avoid another global config option. Plus, I can't imagine anyone actually bothering to find and use this setting. We could do 3., which would be pretty simple, but also requires modifications in 4 platform backends (x11, wayland, osx, win). Option 4 would implement it in the OSC and possibly allow fancy interactions (like visually indicating the action the drop will have), but it also sounds very complicated, and I don't volunteer to do the osc.lua part of the implementation. |
I like 1 but obviously a certain % would disagree & want a new DnD to start immediately. 3 seems ok, again here would prefer the modifier to be for 'old' behavior as I'd take a guess the majority would like the 'new' behavior. |
|
3 would without doubt result in people requesting a config option to reverse the shift/no-shift behavior. |
Append to playlist is now implemented on X11 and Windows when dropping with the shift key. Leaving this open as it still needs to be implemented on MacOS and Wayland. I can probably figure out Wayland in the next day or so, but I have no way of testing on MacOS, so someone else will have to do that. |
As far as I can tell, Wayland suffers from the same problem as X11 in that the drag destination doesn't get any direct information about modifier keys. In contrast, this is something that Windows got dead right. Furthermore, unlike X11 Wayland does not currently have the concept of drag and drop actions, although it looks like this is being planned / discussed. Therefore, I don't think it is currently possible to implement this for Wayland. |
So OSX remains the only platform to do (if it's even possible there). Marking as stalled, since no one seems interested. I may one day be able to beg/borrow/steal a Mac, but no promises. |
Just to clarify, it’s currently possible to append to the playlist with ⇧+drag-and-drop on the window on every OS but OS X. However, it’s not possible to append to the running playlist via the CLI. Is that correct? |
Seems so.
You can via Lua scripting or the JSON IPC, but there's no higher level builtin support for it with the normal "user interface". |
Yes, that’s what I meant. Thank you for the fast reply. |
As an end-user the way I would like to see this issue resolved is by making the drag-and-drop event a customizable keybinding, so I could decide what to do. (The path would be expanded somehow) Not sure if that makes any sense in the mpv input frame work, but it would certainly be the most elegant way to let users decide whether to replace or append new files. |
Passing the path is exactly the problem. |
@Akemi |
When dropping a file on mpv, either on the window or the App bundle icon, while holding the shift key the dropped files will be appended to the playlist. Fixes mpv-player#2166
that should do it. |
@Akemi Thank you for this. Still no way to do it via CLI, is that correct? |
just the ways that were already mentioned i believe. i just took care of the missing cocoa part. |
Asking because the original request (top post) included it (emphasis added):
But yes, as I understand it, it doesn’t do that in any OS. Was just checking. Again, thank you for implementing it. |
Thank you very much! |
Alright! So I need this to be configurable 😃 Would it be best if I made a new feature request or no? |
Couldn't you just use "mpv playlist.m3u" and then "cat filename >> playlist.m3u" with things you want to append to it? The nice thing about that is you can also "cat playlist.m3u" to SEE what's on it and even "vi playlist.m3u" to modify it! :-) Sadly, no. It looks like mpv reads in the playlist at program start time and doesn't look at it again. :-( But I see that shift-drag-drop from Finder to mpv's "art window" now works on MacOS to build an invisible playlist on the fly. ¯_(ツ)_/¯ |
Add option for the user to add files to a playback queue when dragging and dropping files/URLs on to mpv or launching a new mpv with a command line switch which will add media to the playlist of an already running mpv process.
Right now there doesn't seem to be an option to change the default behaviour of mpv if a file/URL should be dropped on to it. Case in point:
input/event.c - line 23
Thanks!
The text was updated successfully, but these errors were encountered: