mattcoughlin Posted May 25, 2019 Share Posted May 25, 2019 Is there any way to do this? I had radarr upgrade my library and now its downloading multiple terabytes of data and the problem i'm having is that the download speed is almost as fast, sometimes faster, than the mover. So the mover is still running 12+ hours later. Is there a way to do this without completely stopping sabnzbd so the upacker can still finish as well as other programs adding things to the que. Quote Link to comment
SeeThruHead Posted December 26, 2021 Share Posted December 26, 2021 (edited) this is the first topic that comes up with searching for "unraid pause sabnzbd during mover" So I thought I would answer it even tho it's old. CA mover tuning allows you to run scripts when move starts and ends. You can run a script to sent http request to sabnzbd to pause when move starts and resume when it ends You can write this script however you want to i created my own nodejs docker container with the npm module 'sabnzbd' installed i then run that docker container to execute my scripts this is my docker run sh script #!/bin/sh docker run -it --rm \ -v /mnt/user/appdata/seethruhead_sabnzbdscriptrunner/scripts:/usr/src/app/scripts \ -e URL=http://SABNZBDHOST:8080 \ -e APIKEY=YOURAPIKEY \ --network="YOURDOCKERNETWORK" \ seethruhead/sabnzbdscriptrunner node $1 CA mover schedule settings: Script to run before mover (No checks, always runs): /mnt/user/appdata/seethruhead_sabnzbdscriptrunner/run.sh ./scripts/pause.js Script to run after mover (No checks, always runs): /mnt/user/appdata/seethruhead_sabnzbdscriptrunner/run.sh ./scripts/resume.js i places run.sh and my scripts folder into /mtn/user/appdata/seethruhead_sabnzbdscriptrunner the scripts folder is mounted to my container pause.js: const SABnzbd = require('sabnzbd'); if (!(process.env.URL && process.env.APIKEY)) { console.error('Missing URL OR APIKEY'); process.exit(1); } const client = new SABnzbd(process.env.URL, process.env.APIKEY); client.version().then(version => { console.log(version); client.queue.pause().then(() => { console.log('client paused'); process.exit(0); }) }).catch(error => { console.log('error'); console.log(error.message); }); resume.js const SABnzbd = require('sabnzbd'); if (!(process.env.URL && process.env.APIKEY)) { console.error('Missing URL OR APIKEY'); process.exit(1); } const client = new SABnzbd(process.env.URL, process.env.APIKEY); client.version().then(version => { console.log(version); client.queue.resume().then(() => { console.log('client resumed'); process.exit(0); }) }).catch(error => { console.log('error'); console.log(error.message); }); There are easier ways to do this but i wanted to use javascript for some reason. hopefully this will answer the question for anyone googling for this search term Edited December 26, 2021 by SeeThruHead Quote Link to comment
stayupthetree Posted January 25, 2022 Share Posted January 25, 2022 Yooo. Thank you! Op maybhave moved on. But you dropping in an answer to and old question will help future people who search like did for answers. We typically find "no one ever helped" or "nevermind figured it out" without any actual solutions. Thank Thank Thank you Quote Link to comment
KJThaDon Posted January 29, 2023 Share Posted January 29, 2023 On 1/25/2022 at 6:31 AM, stayupthetree said: Yooo. Thank you! Op maybhave moved on. But you dropping in an answer to and old question will help future people who search like did for answers. We typically find "no one ever helped" or "nevermind figured it out" without any actual solutions. Thank Thank Thank you I was actually just searching on a way to do this also. Can you give some of use more beginner docker users some clarification on how to do this? I created the folders and script files in appdata I created the docker run script in my user scripts but don't know how to install and where to go and configure for node and the sabnzbd node module. Any help is appreciated! Quote Link to comment
engels74 Posted April 19 Share Posted April 19 Just wanted to chime in, with some very simple bash scripts. I'm using these, since I'm running SABnzbd behind a reverse proxy, but I'm sure they work fine using local addresses as well. pauseSAB.sh (before mover starts) #!/bin/bash # SABnzbd API key API_KEY="insert-api-key-here" # SABnzbd URL URL="https://sabnzbd.domain.com/api" # Pause command to SABnzbd curl -s "$URL?apikey=$API_KEY&mode=pause" > /dev/null resumeSAB.sh (after mover ends) #!/bin/bash # SABnzbd API key API_KEY="insert-api-key-here" # SABnzbd URL URL="https://sabnzbd.domain.com/api" # Pause command to SABnzbd curl -s "$URL?apikey=$API_KEY&mode=resume" > /dev/null The scripts work fine and pauses SABnzbd instantly. I haven't tested them extensively with the Mover running yet, though. But they do as advertised - pauses and resumes SABnzbd's downloads :) Quote Link to comment
Judd35472 Posted July 2 Share Posted July 2 On 4/19/2024 at 4:20 PM, engels74 said: Just wanted to chime in, with some very simple bash scripts. I'm using these, since I'm running SABnzbd behind a reverse proxy, but I'm sure they work fine using local addresses as well. pauseSAB.sh (before mover starts) #!/bin/bash # SABnzbd API key API_KEY="insert-api-key-here" # SABnzbd URL URL="https://sabnzbd.domain.com/api" # Pause command to SABnzbd curl -s "$URL?apikey=$API_KEY&mode=pause" > /dev/null resumeSAB.sh (after mover ends) #!/bin/bash # SABnzbd API key API_KEY="insert-api-key-here" # SABnzbd URL URL="https://sabnzbd.domain.com/api" # Pause command to SABnzbd curl -s "$URL?apikey=$API_KEY&mode=resume" > /dev/null The scripts work fine and pauses SABnzbd instantly. I haven't tested them extensively with the Mover running yet, though. But they do as advertised - pauses and resumes SABnzbd's downloads Thx! I added these to my user scripts to test and they work great. I have a question though about next step though. Do i cut and paste whole script into the mover plugin fields or do I paste a link to the userscript into that field? im a newbie. thx again! Quote Link to comment
engels74 Posted July 10 Share Posted July 10 On 7/2/2024 at 6:03 PM, Judd35472 said: Thx! I added these to my user scripts to test and they work great. I have a question though about next step though. Do i cut and paste whole script into the mover plugin fields or do I paste a link to the userscript into that field? im a newbie. thx again! That's exactly what I do - it works wonderfully Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.