Adding torrents using Remote Torrent Adder
This guide is for advanced users only and is not officially supported by USB, as it is frequently updated voluntarily by our staff and it may be broken in some slots. Only proceed if you know what you're doing. If there are any questions on the installation or the execution of the scripts, you may ask on the USB Community server.In
As many of you know, Deluge is fast and more aggressive to upload but it starts to become a real nuisance once you load more than 500 torrents. rTorrent, on the other hand, is good at handling large amount of seeding torrents, making it ideal for long term seeding.
This guide will help you automate the process of moving your torrents from Deluge to rTorrent for long-term seeding.
Preparation
- By default, Deluge downloads to
~/Downloads
and rTorrent downloads to~/files
. - Please ensure that both Deluge and rTorrent download to the same directory.
Deluge requires an absolute path to your Download to: directory, so you'll have to enter something like /home13/username/Downloads
, not ~/Downloads
. rTorrent, on the other hand, will accept shortcuts such as ~/Downloads
.
Install Dependencies
- Login to your slot's SSH terminal and execute the following commands
Python 3
wget https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/Language%20Installers/python-pip-install.sh
chmod +x python-pip-install.sh
bash python-pip-install.sh
perl
screen -m bash -c "curl -L http://xrl.us/installperlnix | bash"
- After that run the following commands
exec $SHELL
python -m pip install requests service_identity cryptography perl
perl -MCPAN -e 'install Convert::Bencode'
- The installer is interactive so respond to the prompts as follows
Would you like to configure as much as possible automatically? [yes] yes
What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')[local::lib]
Would you like me to append that to /homexx/username/.bashrc now? [yes] yes
- After the installation, loadÂ
.bashrc
by doing the following command
exec $SHELL
Download Scripts
- For this guide,
we'llwebewillsettinginstallupitextensionsinthat~/scripts
send- You
filesmayfromchooseyouranotherbrowserfoldertoaccordingly.
torrentyourremote - You
- Run the
Extensionfollowing:
Installing
mkdir -p $HOME/scripts && cd $HOME/scripts
wget https://raw.githubusercontent.com/lethanhviet/autoExport/master/rtorrent_fast_resume.pl
wget https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/deluge-rtorrent/autoExport.py
Configuration
InstallEdittheautoExport.py
extensioninfromyourthesefavoritelinkseditor. We'll usenano
.- The following are optional fields and can be leave as blank
Chromium:FillRemoteoutTorrentdiscord_url
Adderif you want Discord notificationsFirefox:EnableTorrentis_interactive
Controlif you want to run the script manually and see the output in your terminal.
Settingnano Up
autoExport.py
nano Up
Remote Torrent Adder
OnceFindinstalled,thisrightsectionclickof theextensionscript andclickeditOptions.accordingly
#######################################################
# Customize
#######################################################
is_interactive = False # Set this to True to allow direct output or set to False for cron
discord_url = "" # Discord Webhook URL
minseedtime = 24 # Minimum seeding time (in hours)
src = home_dir + "/scripts/" # Where is rtorrent_fast_resume.pl kept?
state_folder = home_dir + "/.config/deluge/state/" # Link to deluge's state folder
watch_folder = home_dir + "/watch/" # Link to rTorrent's watch folder
deluge_port = 12345 # Deluge Port. Found under "Remote client access" section in UCP
deluge_user = "username" # Deluge Username. Found under "Remote client access" section in UCP
deluge_pass = "p@55w0rd" # Deluge Password. Found under "Remote client access" section in UCP
It is critical you ensure your folder paths are properly quoted
For example: watch_folder = "/homeXX/user/watch/"
Then,autoExport.sh
aisnewthetabscriptappearsyou'll actually run. TheautoExport.sh
script essentially just runs theautoExport.py
script, but specifically using the custom version of Python included with Deluge.- Save the
RemotescriptTorrentonAdderscripts
setup page. Click Add server to add one. The following connection details are shown below:folder
ruTorrent
wget https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/deluge-rtorrent/autoExport.sh
Serverchmod name:+x {anyautoExport.sh
name}
Testing
- You can now choose to test out your script by running it manually
$HOME/scripts/autoExport.sh
sure to setyourin
Host:is_interactive{username}.{servername}.usbx.me=Port: 443 SSL: Checked Username: {username} Password: Password: As configuredTrueUCPorderundertoruTorrentseeRelativethePath:output/rutorrentin
terminal window
This
willSetting
throwUp a Server respondedScheduling with an irregular HTTP code when adding a torrent. You can safely ignore this error.
Deluge
Server name: {any name}
Server type: Deluge WebUI
Host: {username}.{servername}.usbx.me
Port: 443
SSL: Checked
Username: {username}
Password: Password: As configured in UCP under Deluge
Relative Path: /deluge
Transmission
Server name: {any name}
Server type: Transmission WebUI
Host: {username}.{servername}.usbx.me/transmission/rpc
Port: 443
SSL: Checked
Username: {username}
Password: Password: As configured in UCP under Transmission
Torrent Control
cron
- To set
TorrentupControlaup,cronclick the plugin icon. This will take you to its configuration page.job
crontab -e
ToAddaddtheafollowingnew server, goentry toServer ConfigurationOnrun theCurrentscriptservereverydropdown,6selecthoursNew- Assuming you want to execute the script every 6 hours
ServerruTorrent
Server0 name:*/6 {any* name}* Bittorrent* Client: ruTorrent
Server address: https:~//{username}.{servername}.usbx.me/rutorrent
Username: {username}
Password: As configured in UCP under ruTorrent
Click Save after configuringscripts/autoExport.sh
For more information on crontab schedules, visit crontab.guru
Deluge
Server name: {any name}
Bittorrent Client: Deluge
Server address: https://{username}.{servername}.usbx.me/deluge
Password: As configured in UCP under Deluge
Click Save after configuring
Transmission
Server name: {any name}
Bittorrent Client: Transmission
Server address: https://{username}.{servername}.usbx.me/transmission/rpc
Username: {username}
Password: As configured in UCP under Transmission
Click Save after configuring