feat(servers): enable skip intro button in jellyfin-web
All checks were successful
Discord / discord commits (push) Successful in 36s

This commit is contained in:
matt1432 2024-03-08 14:36:52 -05:00
parent 9a19aee4d2
commit 92bf9267ca

View file

@ -10,14 +10,9 @@
if config.nvidia.enableCUDA if config.nvidia.enableCUDA
then pkgs.cudaPackages.pkgs then pkgs.cudaPackages.pkgs
else pkgs; else pkgs;
in {
services.jellyfin.package = jellyPkgs.jellyfin;
environment.systemPackages = [ jellyWeb = jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
jellyPkgs.jellyfin # Inject skip intro button
jellyPkgs.jellyfin-ffmpeg
(jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
patches = patches =
[ [
(pkgs.fetchpatch { (pkgs.fetchpatch {
@ -28,10 +23,30 @@ in {
] ]
++ optionals (hasAttr "patches" o) o.patches; ++ optionals (hasAttr "patches" o) o.patches;
# Enable backdrops by default # Enable backdrops by default. Not sure if it actually works
postInstall = '' postInstall = ''
sed -E -i 's/enableBackdrops\:function\(\)\{return P\}/enableBackdrops\:function\(\)\{return \_\}/' $out/share/jellyfin-web/main.jellyfin.bundle.js substituteInPlace $out/share/jellyfin-web/main.jellyfin.bundle.js \
--replace-fail \
'enableBackdrops:function(){return P}' \
'enableBackdrops:function(){return _}'
''; '';
})) });
jellyfinPkg = jellyPkgs.jellyfin.overrideAttrs (_: o: {
# This was the only way I found to replace the jellyfin-web package
preInstall = ''
makeWrapperArgs+=(
--add-flags "--ffmpeg ${jellyPkgs.jellyfin-ffmpeg}/bin/ffmpeg"
--add-flags "--webdir ${jellyWeb}/share/jellyfin-web"
)
'';
});
in {
services.jellyfin.package = jellyfinPkg;
environment.systemPackages = [
jellyfinPkg
jellyWeb
jellyPkgs.jellyfin-ffmpeg
]; ];
} }