rclone+Deluge+Plex: How do I automatically copy completed downloads? - eviltoast

I have a plex setup on Ubuntu with Deluge, Jackett, *arr apps, etc. All is gravy.

Except I currently need to manually run rclone copyto on completed Deluge torrents in order to [reliably] pipe the media to rclone/Plex.

Context:

  1. Deluge downloads to ~/local/
  2. rclone is mounted to ~/gdrive/ using:
rclone mount gdrive: ~/gdrive --allow-other --vfs-cache-mode off --bwlimit 15M --tpslimit 4 --tpslimit-burst 4
  1. Plex serves from ~/gdrive/Media/TV and ~/gdrive/Media/Movies

Initially I was using Deluge Labels to auto-move completed downloads, but this resulted in IO errors (and occasionally illegal disk seeks when I messed with enabling vfs cache writes).

I tried setting up a cron job to monitor ~/local/ for completed files then copying to rclone, but that resulted in IO errors.

The ONLY reliable solution I’ve found is manually running rclone copyto from a screen session for completed downloads. It works but it’s a pain in the ass.

My questions for yall:

  1. Any idea why I’m getting these IO errors? I’m not pegging the CPU or the disk. There doesn’t seem to be hardware issue, it really feels like the problem relates to rclone and Google’s APIs

  2. Any idea how to troubleshoot this and get downloads automatically moving? Any logging mechanism I use (Deluge, rcloone, kernel) just gives generic IO errors. It doesn’t point me in any direction

  • aramisathei@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You’re saying generic IO errors, but I’ve found rclone logs to be pretty specific when set to debug. At the very least what part of process do the errors start happening? Good place to start. Haven’t used gdrive in a long time, though as I recall they used to have rate-limiting which could be a factor as well.

    Another question is if the problem is moving after file completion, why stick to rclone if you’re running into issues? Moving deluge completes to a local fs to check for errors in that process, and then either manual or a cron/timer/script with something like rsync for the final move would work for troubleshooting. At some point you’re going to run into an error more detailed than “IO error.”