Jorman / Scripts

Some script, forked and not to make me crazy!
MIT License
207 stars 26 forks source link

hash_check: command not found #9

Closed Pupwiz closed 2 years ago

Pupwiz commented 2 years ago

Both Sonarr and Radarr are throwing errors on these lines the hash_check isn't something sonarr / radarr understands in Debian 11 and I cant find where it was defined in the script. Running it manual and not as a radarr / sonarr connect script doesn't cause issues.

AddTransmissionTrackers.sh: line 174: hash_check: command not found

  hash_check "${hash}"
  if [[ $? -ne 0 ]]; then
    echo "The download is not for a torrent client, I'll exit"
    exit
  fi

This command is caused by a pipe issue i believe but also cant figure out how to fix the code

line 153: wait: pid 5 is not a child of this shell

if [[ -n "${sonarr_download_id}" ]] || [[ -n "${radarr_download_id}" ]] || [[ -n "${lidarr_download_id}" ]] || [[ -n "${readarr_download_id}" ]]; then wait 5

Maybe you can provide some insight. The script still seems to run and do it's required purpose.

Thanks

Jorman commented 2 years ago

Hi,

you right, is not Debian 11 problem is my fault, when I updated the Transmission code I forgot the hash_check function. This function is used to check the hash that *arr is passing to the script, if the hash is valid ok.

Please try now, I added the missing function

Pupwiz commented 2 years ago

Thanks and yes that stopped the hash_check error. Any idea why the " then wait 5" is causing *arr to log this as an error? Other than that I'm happy with function as it works.

Thanks

Jorman commented 2 years ago

Hi, I don't know why *arr consider that error, maybe don't like the pause without any output. You can remove it if you don't want to see the error, but you have to check if it works correctly because it happened to me that the script was faster than the client and then, when it tried to inject the trackers, the torrent file didn't exist yet and so it returned error

J