arr-scripts icon indicating copy to clipboard operation
arr-scripts copied to clipboard

[BUG] - Lidarr - Infinite download loop with percentages exceeding 100%

Open maxime-killinger opened this issue 9 months ago • 4 comments

Application Lidarr

Host platform Unraid (Docker)

Script audio-script

Script Version 2.48

Describe the bug Some tracks get stuck in an infinite download loop, displaying download percentages exceeding 100%. The process never completes.

To Reproduce Steps to reproduce the behavior:

  1. Use the audio-script with Lidarr (latest version).
  2. Trigger an automatic album download.
  3. Observe the download log.
  4. Some tracks show download percentages above 100% and never finish.

Expected behavior The download should complete properly without exceeding 100% or looping indefinitely.

Logs/Screenshots

[album_601269752_9] CMYK - Dream (Move My Feet) :: Downloading track. Downloading 27881654 bytes.
[album_601269752_9] Download at 936%
[album_601269752_9] Download at 938%
[album_601269752_9] Download at 940%
...
[album_601269752_9] Download at 970%

Additional context Issue occurs randomly on different albums. It started happening after updating Lidarr to the latest version. The affected downloads never complete.

maxime-killinger avatar Mar 07 '25 06:03 maxime-killinger

Sounds like a problem with the download client, you might want to see if you can replicate the issue just using the client itself and report the issue upstream.

RandomNinjaAtk avatar Mar 12 '25 12:03 RandomNinjaAtk

Have same issue. Same platform unraid. Just noticed it.

xawoger avatar Mar 16 '25 21:03 xawoger

Sounds like a problem with the download client, you might want to see if you can replicate the issue just using the client itself and report the issue upstream.

I am pretty sure it is a problem with deemix script not with download clients. When this happens there is no other downloading clients being used.

xawoger avatar Mar 17 '25 10:03 xawoger

I've got the same problem running on truenas scale, for the time being i've added to my lidarr compose a monitor that'll restart lidarr when the download percentage goes over 100%:

  lidarr-monitor:
    image: docker:cli
    tty: true
    network_mode: bridge
    depends_on:
      - lidarr
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: >
      sh -c " while true; do
        log_line=$$(docker logs --since 5s lidarr 2>&1 | grep -m1 'Download at')
        if [ -n \"$$log_line\" ]; then
          percent=$$(echo \"$$log_line\" | grep -o '[0-9]\\+%' | sed 's/%//')
          if [ -n \"$$percent\" ] && [ \"$$percent\" -eq \"$$percent\" ] 2>/dev/null; then
            echo \"Found download percentage: $$percent%\"
            if [ $$percent -gt 100 ]; then
              echo \"Restarting lidarr due to excessive percentage: $$percent%\"
              docker restart lidarr
            fi
          else
            echo \"Invalid percentage detected in line: $$log_line\"
          fi
        fi
        sleep 5
      done"
    restart: unless-stopped

alansari avatar Mar 20 '25 07:03 alansari