mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.61k stars 2.92k forks source link

Send to - Shortcut #10398

Open Ichisich opened 2 years ago

Ichisich commented 2 years ago

-Windows specific

Mpv disregards shortcuts which got queued by the "send to" context menu entry entirely. It doesn't matter if it is a file or folder. "Open with" works properly, but isn't able to produce a queue.

It would be nice if mpv could queue shortcuts exactly like normal files and folders.

stax76 commented 2 years ago

I don't understand anything you wrote.

Ichisich commented 2 years ago

Unbenannt

The marked entry called "send to" (in English) is able to send a queue to mpv. Would I use "open" instead, the same three marked pictures would be opened in three separate application windows.

In case shortcuts (to media files or folders that contain media files) are amongst the marked files, mpv would simply skip the files, or worse, just quit given a shortcut would be the last in queue.

stax76 commented 2 years ago

Why would you use or have a shortcut pointing to a media file, it seems to be a very uncommon use case.

Ichisich commented 2 years ago

Often due to my organizational aspirations and mostly concerns links to folders, not single media files. File types have their own storage location each, but topics may overlap and thus easily linked by a shortcut.

Traneptora commented 2 years ago

The way to do this properly would be to treat LNK files as a type of playlist with one entry, and that's the location the LNK points to. While this is not necessarily difficult it's in the "patches welcome" sort of standpoint at the moment. See #8424

stax76 commented 2 years ago

As a quick workaround, it can be sent to powershell and let powershell send it to mpv, the downside is a delay needed to run powershell.

run-hidden powershell -executionpolicy bypass -file D:\send-to-mpv.ps1

https://github.com/stax76/run-hidden

for ($i = 0; $i -lt $args.Length; $i++) {
    if ($args[$i].EndsWith('.lnk')) {
        $sh = New-Object -ComObject WScript.Shell
        $args[$i] = $sh.CreateShortcut($args[$i]).TargetPath
    }
    $args[$i] = '"' + $args[$i] + '"'
}
Start-Process mpv.exe $args

Maybe it can also be done with VBScript, which might be much faster.

Since it's only ten lines of simple code using dotnet, I added now support to mpv.net.

guidocella commented 3 weeks ago

This should have been fixed by e0b517985b.

Ichisich commented 3 weeks ago

No, drag and drop is differently handled. Both generate a queue, but "send to" has still some unique quirks.