feat(servers): enable skip intro button in jellyfin-web
All checks were successful
Discord / discord commits (push) Successful in 36s
All checks were successful
Discord / discord commits (push) Successful in 36s
This commit is contained in:
parent
9a19aee4d2
commit
92bf9267ca
1 changed files with 34 additions and 19 deletions
|
@ -10,28 +10,43 @@
|
||||||
if config.nvidia.enableCUDA
|
if config.nvidia.enableCUDA
|
||||||
then pkgs.cudaPackages.pkgs
|
then pkgs.cudaPackages.pkgs
|
||||||
else pkgs;
|
else pkgs;
|
||||||
|
|
||||||
|
jellyWeb = jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
|
||||||
|
# Inject skip intro button
|
||||||
|
patches =
|
||||||
|
[
|
||||||
|
(pkgs.fetchpatch {
|
||||||
|
name = "skipintro.patch";
|
||||||
|
url = "https://pastebin.com/raw/EEgvReaw";
|
||||||
|
hash = "sha256-kfvOz0ukDY09kkbmZi24ch5KWJsVcThNEVnjlk4sAC0=";
|
||||||
|
})
|
||||||
|
]
|
||||||
|
++ optionals (hasAttr "patches" o) o.patches;
|
||||||
|
|
||||||
|
# Enable backdrops by default. Not sure if it actually works
|
||||||
|
postInstall = ''
|
||||||
|
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 {
|
in {
|
||||||
services.jellyfin.package = jellyPkgs.jellyfin;
|
services.jellyfin.package = jellyfinPkg;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
jellyPkgs.jellyfin
|
jellyfinPkg
|
||||||
|
jellyWeb
|
||||||
jellyPkgs.jellyfin-ffmpeg
|
jellyPkgs.jellyfin-ffmpeg
|
||||||
|
|
||||||
(jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
|
|
||||||
patches =
|
|
||||||
[
|
|
||||||
(pkgs.fetchpatch {
|
|
||||||
name = "skipintro.patch";
|
|
||||||
url = "https://pastebin.com/raw/EEgvReaw";
|
|
||||||
hash = "sha256-kfvOz0ukDY09kkbmZi24ch5KWJsVcThNEVnjlk4sAC0=";
|
|
||||||
})
|
|
||||||
]
|
|
||||||
++ optionals (hasAttr "patches" o) o.patches;
|
|
||||||
|
|
||||||
# Enable backdrops by default
|
|
||||||
postInstall = ''
|
|
||||||
sed -E -i 's/enableBackdrops\:function\(\)\{return P\}/enableBackdrops\:function\(\)\{return \_\}/' $out/share/jellyfin-web/main.jellyfin.bundle.js
|
|
||||||
'';
|
|
||||||
}))
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue