jellyfin-mpv-shim: add module (#7129)

Init of service jellyfin-mpv-shim, emulating plex-mpv-shim already provided.
This commit is contained in:
repparw 2025-05-27 21:10:18 -03:00 committed by GitHub
parent 8cb8a04cb1
commit ad22169efa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 203 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{
jellyfin-mpv-shim-example-settings = ./jellyfin-mpv-shim-example-settings.nix;
}

View file

@ -0,0 +1,3 @@
Alt+0 set window-scale 0.5
WHEEL_DOWN seek -10
WHEEL_UP seek 10

View file

@ -0,0 +1,3 @@
cache-default=%7%4000000
force-window=%3%yes
ytdl-format=%19%bestvideo+bestaudio

View file

@ -0,0 +1,8 @@
{
"allow_transcode_to_h265": false,
"always_transcode": false,
"audio_output": "hdmi",
"auto_play": true,
"fullscreen": true,
"player_name": "mpv-shim"
}

View file

@ -0,0 +1,39 @@
{ ... }:
{
services.jellyfin-mpv-shim = {
enable = true;
settings = {
allow_transcode_to_h265 = false;
always_transcode = false;
audio_output = "hdmi";
auto_play = true;
fullscreen = true;
player_name = "mpv-shim";
};
mpvBindings = {
WHEEL_UP = "seek 10";
WHEEL_DOWN = "seek -10";
"Alt+0" = "set window-scale 0.5";
};
mpvConfig = {
force-window = true;
ytdl-format = "bestvideo+bestaudio";
cache-default = 4000000;
};
};
nmt.script = ''
assertFileContent \
home-files/.config/jellyfin-mpv-shim/conf.json \
${./jellyfin-mpv-shim-example-settings-expected-settings}
assertFileContent \
home-files/.config/jellyfin-mpv-shim/mpv.conf \
${./jellyfin-mpv-shim-example-settings-expected-config}
assertFileContent \
home-files/.config/jellyfin-mpv-shim/input.conf \
${./jellyfin-mpv-shim-example-settings-expected-bindings}
'';
}