diff --git a/jellyfin/CHANGELOG.md b/jellyfin/CHANGELOG.md index edcac676e..c9b4b2c6e 100644 --- a/jellyfin/CHANGELOG.md +++ b/jellyfin/CHANGELOG.md @@ -1,3 +1,6 @@ +## 10.11.4-1 (07-12-2025) +- Avoid deleting the configured data directory when it matches the legacy path while rebuilding symlinks. + ## breaking_versions: 10.11.4 (06-12-2025) - Minor bugs fixed diff --git a/jellyfin/config.yaml b/jellyfin/config.yaml index a34650271..bca57f6c5 100644 --- a/jellyfin/config.yaml +++ b/jellyfin/config.yaml @@ -125,5 +125,5 @@ schema: slug: jellyfin udev: true url: https://github.com/alexbelgium/hassio-addons -version: "10.11.4" +version: "10.11.4-1" video: true diff --git a/jellyfin/rootfs/etc/cont-init.d/20-folders.sh b/jellyfin/rootfs/etc/cont-init.d/20-folders.sh index 04abafc7d..d3e68357f 100755 --- a/jellyfin/rootfs/etc/cont-init.d/20-folders.sh +++ b/jellyfin/rootfs/etc/cont-init.d/20-folders.sh @@ -10,9 +10,21 @@ create_link() { local target_dir="$1" local link_path="$2" + local target_real + local link_real + + target_real=$(realpath -m "$target_dir") + link_real=$(realpath -m "$link_path") + mkdir -p "$target_dir" mkdir -p "$(dirname "$link_path")" + # If the link path is the same as the target, just ensure ownership and exit + if [ "$target_real" = "$link_real" ]; then + chown -R "$PUID:$PGID" "$target_dir" + return + fi + if [ -L "$link_path" ]; then rm "$link_path" elif [ -d "$link_path" ]; then