Skip to content

Magnet links handling #138

@yyakko

Description

@yyakko

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions