Script for mpv that opens the Anilist page for the currently playing (anime) file.
It does this by extracting/guessing the relevant metadata from the file name (using guessit), searching for it on Anilist, and then opening the page in a new tab on your default browser.
You will need Python 3 installed and in your system path, as well as the following libraries: guessit
, requests
:
pip install guessit requests
Copy or symlink the .lua
and .py
files to your mpv scripts folder (if you're unfamiliar with its location, check the mpv documentation).
By default, the script binds itself to Ctrl+A
.
To change default binding simply add following line into your input.conf file inside your mpv config directory.
A script-binding launch_anilist # for mpv-open-anilist-page
You can also change the binding by editing the last line in the .lua
script file.
-- change key binding as desired
mp.add_key_binding('ctrl+a', 'launch_anilist', launch_anilist)
mpv-open-anilist-page is heavily based on mpv-open-imdb-page by ctlaltdefeat. Thanks to mpv-open-kinopoisk-page by WANDEX as well for a great README.md file!
Of course, this would not be possible without guessit and Anilist GraphQL.