Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnet links handling #138

Open
yyakko opened this issue Mar 18, 2024 · 0 comments
Open

Magnet links handling #138

yyakko opened this issue Mar 18, 2024 · 0 comments

Comments

@yyakko
Copy link

yyakko commented Mar 18, 2024

Hello. Thank you for the great script.

I am trying to modify it slightly so that it handles magnet-links same way as http/https and other protocols.
I added the following condition to the is_protocol function:

... or path:match('^magnet:[^%s]+') ~= nil)

And it works for the "stripfilename" function. But the following problem remains: if I add a magnet-link to playlist, save playlist to file, close mpv and open it again, the script adds path of current working directory to the beginning of the link, e.g.
... .config/mpv/watch_later/magnet:? ..., if the current file has been opened before, or /home/user/magnet:? ..., if the file is played for the first time.

If it is important, the operating system is Debian 12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant