Make jellyfin script idempotent

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-07-15 11:01:34 +01:00
parent 72ea51e1d9
commit 31e7d625cf
3 changed files with 50 additions and 36 deletions

View File

@@ -17,15 +17,12 @@ start() {
start "$@"
# shellcheck disable=SC2034
JELLYFIN_HOST="http://localhost:8096"
# shellcheck disable=SC2034
JELLYFIN_ADMIN_USERNAME="${JELLYFIN_ADMIN_USERNAME:-admin}"
until setup="$(curl -sf --retry 10 --retry-connrefused "$JELLYFIN_HOST/System/Info/Public" | jq -r '.StartupWizardCompleted' 2>/dev/null)"; do
echo "Waiting for Jellyfin to be ready..."
sleep 1
done
if [ "$setup" = "false" ] && [ -f /etc/jellyfin/setup.sh ]; then
if [ -f /etc/jellyfin/setup.sh ]; then
# shellcheck disable=SC1091
. /etc/jellyfin/setup.sh

View File

@@ -2,17 +2,16 @@
# AUTO-UPDATE: nix-update --flake jellyfin-plugin-intro-skipper
pkgs.stdenv.mkDerivation rec {
pname = "intro-skipper";
version = "10.11/v1.10.11.2";
version = "10.10/v1.10.10.20";
src =
let
parts = pkgs.lib.strings.splitString "/" version;
major = builtins.elemAt parts 0;
full = builtins.elemAt parts 1;
in
pkgs.fetchzip {
url = "https://github.com/intro-skipper/intro-skipper/releases/download/${major}/${full}/intro-skipper-${full}.zip";
sha256 = "sha256-3orE9jw2LoejeNYltIju1jtxjkHYd/CydDxAxKYcp5U=";
url = "https://github.com/intro-skipper/intro-skipper/releases/download/${version}/intro-skipper-${full}.zip";
sha256 = "sha256-RlrZkE8108Uj5V90+jw2o5fXb+K+9/hoDcEaSkKLDGg=";
stripRoot = false;
};