Sonarr/Radarr apply user-agent on copy

Hello,

Due to the new error of 429, moving files from Radarr or Sonarr on download makes it impossible because it hits the error message as it doesn't apply user-agent anywhere.

Can anyone think of a way of applying 'user-agent' to Radarr/Sonarr moving files without a cronjob that does it later?

Thanks.

If it's moving and copying in the mount, you simply add it to the mount.

I have it in the mount, but for some reason Radarr and Sonarr doesn't enforce it and I get the error messages for Rate Limit Exceeded.

[Unit]
Description=Mount and cache Google drive to /media/Plex
After=syslog.target local-fs.target network.target
[Service]
Environment=RCLONEHOME=/root/.config/rclone
Environment=MOUNTTO=/home/username/Downloads/gdrive
Environment=LOGS=/home/username/logs
Environment=UPLOADS=/home/username/uploads
Type=simple
User=root
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount \
  --log-file ${LOGS}/rclone.log \
  --log-level=INFO \
  --user-agent='Mozilla/5.0' \
  --dir-cache-time=96h \
  --vfs-read-chunk-size=128M \
  --vfs-read-chunk-size-limit=off \
  --vfs-cache-mode=writes \
  --drive-chunk-size=32M \
  --buffer-size=64M \
  --timeout=1h \
  --umask=002 \
  --allow-other \
  --bwlimit=75M \
  --cache-dir ${UPLOADS} \
  --config ${RCLONEHOME}/rclone.conf \
  gdrive: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}
Restart=always
[Install]
WantedBy=multi-user.target

Post a debug log. But if any tool is copying files within the mount then it should be using the parameters set on the mount. Unless there is a bug with mount. You can use --dump-bodies or (I think --dump-headers) to see if it's being applied.

Have you validated that the mount actually works and has the user-agent applied, by using systemctl status your-rclone-service-name (if not, did you reload the systemd daemon and stop/start the service after editing the service file)?

Tried with a full restart but in the Radarr settings I get 'Failed to completely transfer'. Will try to debug both Radarr and rclone to see. Might be something else I guess.

Thanks.

You can simply add an environment variable to specify the rclone user agent system wide. RCLONE_USER_AGENT

Would it be something like this? Wouldn't it be the same as specifying it in the mount manually (sorry for the stupid question but not really familiar with the ENV Variables)?

[Unit]
    Description=Mount and cache Google drive to /media/Plex
    After=syslog.target local-fs.target network.target
    [Service]
    Environment=RCLONEHOME=/root/.config/rclone
    Environment=MOUNTTO=/home/username/Downloads/gdrive
    Environment=LOGS=/home/username/logs
    Environment=UPLOADS=/home/username/uploads
    Environment=RCLONE_USER_AGENT='Mozilla/5.0'
    Type=simple
    User=root
    ExecStartPre=/bin/mkdir -p ${MOUNTTO}
    ExecStartPre=/bin/mkdir -p ${LOGS}
    ExecStartPre=/bin/mkdir -p ${UPLOADS}
    ExecStart=/usr/bin/rclone mount \
      --log-file ${LOGS}/rclone.log \
      --log-level=INFO \
      --user-agent=${RCLONE_USER_AGENT} \
      --dir-cache-time=96h \
      --vfs-read-chunk-size=128M \
      --vfs-read-chunk-size-limit=off \
      --vfs-cache-mode=writes \
      --drive-chunk-size=32M \
      --buffer-size=64M \
      --timeout=1h \
      --umask=002 \
      --allow-other \
      --bwlimit=75M \
      --cache-dir ${UPLOADS} \
      --config ${RCLONEHOME}/rclone.conf \
      gdrive: ${MOUNTTO}
    ExecStop=/bin/fusermount -u -z ${MOUNTTO}
    ExecStop=/bin/rmdir ${MOUNTTO}
    Restart=always
    [Install]
    WantedBy=multi-user.target

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.