kljohann / mpv.el

control mpv for easy note taking
GNU General Public License v3.0
145 stars 15 forks source link

feat: support passing url to `mpv-play` #13

Closed detvdl closed 3 years ago

detvdl commented 3 years ago

Allows users to pass a valid HTTP(S) URL to the mpv-play command, both interactively and non-interactively.

Often I find myself using mpv with its youtube-dl counterpart that allows direct streaming of online content through mpv. This allows for non-filename arguments in the interactive mpv-play command, by locally enabling url-handler-mode for the scope of the interactive completion command and conditionally expanding the argument if it is a non-absolute filepath.

Using it this way does require the user to have youtube-dl installed on their system, so in case that's not sufficiently self-explanatory (I guess anyone who would want to use mpv that way would have found that by now?), I can add something to the documentation about it.

My apologies for the unwanted indentation changes, it appears I have a different lisp-indent-function set than you.

Edit: I only just saw #11 in the issues tab. If you would prefer a separate interactive command to handle this that would be a minor change

detvdl commented 3 years ago

Will close this in favor of a PR from a proper feature branch, with some additions