mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Send to - Shortcut

Open Ichisich opened this issue 2 years ago • 6 comments

-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.

Ichisich avatar Jul 10 '22 20:07 Ichisich

I don't understand anything you wrote.

stax76 avatar Jul 10 '22 21:07 stax76

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.

Ichisich avatar Jul 10 '22 22:07 Ichisich

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

stax76 avatar Jul 10 '22 22:07 stax76

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.

Ichisich avatar Jul 10 '22 22:07 Ichisich

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

Traneptora avatar Jul 10 '22 23:07 Traneptora

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.

stax76 avatar Jul 10 '22 23:07 stax76