Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
507 stars 35 forks source link

Support user-added link types #7

Closed noctuid closed 4 years ago

noctuid commented 4 years ago

I'm using another script that adds support for magnet links, for example. It would be nice if there was setting where you could provide a string to match against (e.g. magnet:). If the clipboard contents match, it would just take the default behavior instead of failing (mp.commandv('loadfile', videoFile, 'append-play') for paste-playlist).

Eisa01 commented 4 years ago

@noctuid I have added a new function linked to an array that makes the protocols definable.

Well what it means is that now you have a setting to add whatever protocols you like SmartCopyPaste-II-2.1.txt Rename it to .lua

I have already added to it https and magnet. You can modify it further to your needs

This version also should fix your other issue https://github.com/Eisa01/mpv-scripts/issues/6

Please do test and let me know so I close this issue ^ ^

noctuid commented 4 years ago

Thanks! Yeah that works correctly for both issues.