You are not logged in.

#1 2017-08-06 07:37:01

andrej
Member
Registered: 2012-03-31
Posts: 23

Starting MPV from a .desktop for a custom protocol handler fails

I'm trying to get MPV to play ytdl:// schema URLs. It's a schema built into MPV so it can be passed to it directly e.g.

mpv ytdl://www.youtube.com/watch?v=vid_id

works out of the box with youtube-dl.

So I've added a ~/.local/share/applications/ytdl.desktop:

[Desktop Entry]
Type=Application
Name=ytdl
NoDisplay=true
Exec=mpv --player-operation-mode=pseudo-gui --loop-playlist %U
Terminal=false
MimeType=x-scheme-handler/ytdl;

And ~/.config/mimeapps.list:

[Default Applications]
x-scheme-handler/ytdl=ytdl.desktop

This handler works but MPV won't start. I get the following in journalctl:

avg 06 16:12:51 abc kde-open5[31182]: kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "ytdl"
avg 06 16:12:51 abc kde-open5[31182]: kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "ytdl"
avg 06 16:12:51 abc kde-open5[31182]: kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "ytdl"
avg 06 16:12:51 abc kde-open5[31182]: kf5.kio.core: "preferred service for x-scheme-handler/ytdl" "mpv"
avg 06 16:12:51 abc kwin_x11[23969]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50729, resource id: 85983237, major code: 18 (ChangeProperty), minor code: 0
avg 06 16:12:51 abc kwin_x11[23969]: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50733, resource id: 85983238, major code: 18 (ChangeProperty), minor code: 0

Any idea why the window won't render?

Thanks

Last edited by andrej (2017-08-06 08:03:23)

Offline

Board footer

Powered by FluxBB