debridmediamanager / zurg-testing

A self-hosted Real-Debrid webdav server you can use with Infuse. Together with rclone it can mount your Real-Debrid torrent library into your filesystem and load it to Plex or Jellyfin.
416 stars 30 forks source link

Bug: Ocassionally plex_update.sh error when running No Docker setup. #103

Open kent-chan-dev opened 4 months ago

kent-chan-dev commented 4 months ago

Expected Behavior I expect the script to run properly, however it is giving this error when running No docker setup. What could be causing the issue?

Appears to be happening when adding movies, however it works without issue when removing movies.

2024-04-15T00:59:53.245Z ERROR manager Failed to execute hook on_library_update: error executing script: exit status 2; stderr: plex_update.sh: 19: Bad substitution

Actual Behavior My plex_update.sh file

plex_url="http://localhost:32400" token="mytoken" zurg_mount="$HOME/torrents"

section_ids=$(curl -sLX GET "$plex_url/library/sections" -H "X-Plex-Token: $token" | xmllint --xpath "//Directory/@key" - | grep -o 'key="[^"]*"' | awk -F'"' '{print $2}')

Operating System Ubuntu Server

Environment Setup Are you using Docker, or are you using Zurg's binary? Not docker. If Docker, please include your docker-compose.yml. If Zurg's binary, specify the version by running ./zurg version

petern-sc commented 3 months ago

What do you have set for on_library_update in your config.yml?

on_library_update: /root/zurgfiles/plex_update.sh "$@"

It was previously sh /root/zurgfiles/plex_update.sh "$@", after dropping sh it worked properly for me.