Baldomo / open-in-mpv

Simple web extension to open videos in mpv
GNU General Public License v3.0
119 stars 7 forks source link

ytdl-format string interprented as multiple arguments #7

Closed user18130814200115-2 closed 2 months ago

user18130814200115-2 commented 2 years ago

With mpv, you can pass a ytdl-format option allowing for selection f resolutions and audio quality. If you do this with this extension, the + signs (which are part of the format string) are interpreted and separate out the arguments.

For example: ytdl-format=bestvideo[height<=480]+bestaudio becomes --ytdl-format=bestvideo[height<=480] bestaudio

For celluloid (with default config), the string becomes: --mpv-ytdl-format=bestvideo[height<=480] --mpv-bestaudio

user18130814200115-2 commented 2 years ago

I just found this can be fixed by encoding the + as %2B, so perhaps his is more of a documentation issue.

Baldomo commented 2 years ago

Could you try escaping the + with \+? It sounds like the way encodeURIComponent works clashes with how Go's url.QueryUnescape() works.

Baldomo commented 3 months ago

I could not reproduce this bug in recent versions, could you please check for yourself?

user18130814200115-2 commented 2 months ago

Looks resolved, thanks!