67 lines
1.8 KiB
Markdown
67 lines
1.8 KiB
Markdown
# JnJ - Jellies and Jams
|
|
A jellyfin client built into mpv
|
|
## Configuring
|
|
Every option in JnJ may be configured via a script-message. Example:
|
|
```lua
|
|
local mp = require("mp")
|
|
local utils = require("mp.utils")
|
|
|
|
-- action keybind
|
|
mp.commandv("script-message", "jnj-bind-toggle", "Ctrl+j")
|
|
mp.commandv("script-message", "jnj-bind-enter", "l")
|
|
mp.commandv("script-message", "jnj-bind-leave", "h")
|
|
mp.commandv("script-message", "jnj-bind-down", "j")
|
|
mp.commandv("script-message", "jnj-bind-up", "k")
|
|
mp.commandv("script-message", "jnj-bind-toggle-played", "m")
|
|
mp.commandv("script-message", "jnj-bind-toggle-favorite", "s")
|
|
|
|
-- send user login info (this should be done through a script message to ensure
|
|
-- other scripts cannot leach your password from the script-message
|
|
mp.commandv("script-message-to", "jellies_and_jams" "jnj-set-settings",
|
|
utils.format_json({
|
|
url = 'http://localhost:8096',
|
|
username = 'username',
|
|
password = 'password'
|
|
}))
|
|
```
|
|
|
|
### Available actions
|
|
- jnj-set-settings
|
|
- jnj-bind-toggle
|
|
- jnj-bind-open
|
|
- jnj-bind-close
|
|
- jnj-bind-leave
|
|
- jnj-bind-down
|
|
- jnj-bind-up
|
|
- jnj-bind-toggle-played
|
|
- jnj-bind-toggle-favorite
|
|
- jnj-bind-top
|
|
- jnj-bind-bottom
|
|
- jnj-bind-pagedown
|
|
- jnj-bind-pageup
|
|
|
|
`jnj-bind-*` takes a keybind as their only argument
|
|
|
|
`jnj-set-settings` takes a json formatted string of the following structure:
|
|
```json
|
|
{
|
|
"url":"",
|
|
"username":"",
|
|
"password":"",
|
|
"header":{
|
|
"prefix": "jellyfin/",
|
|
"separator":"/",
|
|
"contents":[
|
|
["watched", " ","favorite"," ","runtime"],
|
|
["stars"," ","rating"," ","release"]
|
|
]
|
|
},
|
|
"client":{
|
|
"name":"Jellyfin Lua Client",
|
|
"device":"Mpv",
|
|
"version":"1.1"
|
|
}
|
|
}
|
|
```
|
|
All filled in values are provided by default, but may be changed by the user.
|