Merge pull request #788 from TRaSH-/Guide-How-to-run-the-unRaid-mover-for-qBittorent-seeding-torrents

[Guide] How to run the unRaid mover for qBittorent seeding torrents
pull/795/head
TRaSH 2 years ago committed by GitHub
commit 5a36bf96c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,22 +1,24 @@
# How to run the unRaid mover for qBittorent seeding torrents
{! include-markdown "../../../../includes/downloaders/basic-setup.md" !}
<!-- --8<-- "includes/downloaders/basic-setup.md" -->
When you make use of the unRaid cache drive for your `/data/torrents` share and the torrents in qBittorent are still seeding then the mover can't move files, because they are still in use.
Using the following instructions you will be able to move the files with the use of the qBittorrent API.
??? summary "Workflow Rules - [CLICK TO EXPAND]"
!!! summary "Workflow Rules - [CLICK TO EXPAND]"
1. Pause torrents older than last x days.
1. Run the mover.
1. Resume the torrents once the mover is completed.
!!! Danger
If you're going to make use of this make sure you're using `Post-Import Category` in your Starr apps [^1] Download clients settings, especially when you're using the Seed Time/Ratio settings in your Indexers settings in the Starr apps.
## Warning
!!! Danger "If you make use of the Seed Time/Ratio settings in your Indexers settings in the Starr apps[^1].<br> Make sure you're using `Post-Import Category` in your Starr apps Download clients settings.<br>Else it could happen when the torrents get paused that they get removed by the Starr apps before the seeding goal is reached."
!!! attention
The screenshots are just examples to show you how it should look and where you need to place the data that you need to add, they aren't always a 100% reflection of the actual data and not always 100% up to date with the actual data you need to add.
Else it could happen when the torrents get paused that they get removed by the Starr apps before the seeding goal is reached :bangbang:
- Always follow the data described in the guide.
- If you got any questions or aren't sure just click the chat badge to join the Discord Channel where you can ask your questions directly.
## Needed
@ -58,43 +60,36 @@ With this option we're going to install the qBit API when the Array is started t
Go to your unRaid Dashboard to your settings tab and select in the `User Utilities` at the bottom the new plugin you installed `User Scripts`.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!User Scripts](images/Unraid-settings-user-scripts-icon.png)
![!User Scripts](images/Unraid-settings-user-scripts-icon.png)
Select at the bottom `ADD NEW SCRIPT`.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Add New Script](images/Unraid-user-scripts-add-new-script-icon.png)
![!Add New Script](images/Unraid-user-scripts-add-new-script-icon.png)
A popup will appear where you can give it a name, for this example we're going to use `Install qBittorrent API` and then click on `OK`.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Install qBittorrent API](images/Unraid-user-scripts-add-new-script-enter-name.png)
![!Install qBittorrent API](images/Unraid-user-scripts-add-new-script-enter-name.png)
Click in the list on the cogwheel of the new user scrip you made.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Select user script](images/Unraid-settings-user-scripts-list-select-qbit-api.png)
![!Select user script](images/Unraid-settings-user-scripts-list-select-qbit-api.png)
Copy/Paste in the new windows that opens the following bash command followed by `SAVE CHANGES`.
```bash
#!/bin/bash
pip install qbittorrent-api
pip3 install qbittorrent-api
```
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Bash script](images/Unraid-settings-user-scripts-qbit-api.png)
![!Bash script](images/Unraid-settings-user-scripts-qbit-api.png)
Select in the schedule list when the script should run, and choose `At First Array Start Only`.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Set Run Time](images/Unraid-settings-user-scripts-qbit-api-schedule.png)
![!Set Run Time](images/Unraid-settings-user-scripts-qbit-api-schedule.png)
Click on `RUN IN BACKGROUND` or restart your unRaid server so the qBit API is installed.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!RUN IN BACKGROUND](images/Unraid-settings-user-scripts-qbit-api-run-background.png)
![!RUN IN BACKGROUND](images/Unraid-settings-user-scripts-qbit-api-run-background.png)
------
@ -105,7 +100,7 @@ With this option we're going to install the qBit API when the unRaid server is s
On your USB stick/key go to `/boot/config` and open the `go` file with your favorite editor ([VSCode](https://code.visualstudio.com/){:target="_blank" rel="noopener noreferrer"}/[Notepad++](https://notepad-plus-plus.org/downloads/){:target="_blank" rel="noopener noreferrer"}) and copy/paste the following command.
```bash
pip install qbittorrent-api
pip3 install qbittorrent-api
```
Restart your unRaid Server, or run the above command from the terminal.
@ -123,8 +118,8 @@ You only need to edit a few options in the script
# Set Number of Days to stop torrents for the move
days = 2
qbt_host = '192.168.2.200:8080'
qbt_user = admin
qbt_pass = adminadmin
qbt_user = 'admin'
qbt_pass = 'adminadmin'
# --DEFINE VARIABLES--#
```
@ -133,7 +128,7 @@ qbt_pass = adminadmin
- `qbt_user` => Your used qBittorrent `User Name` if you have authentication enabled.
- `qbt_pass` => Your used qBittorrent `Password` if you have authentication enabled.
!!! failure ""
!!! attention ""
If you don't use the unRaid `Mover Tuning` app, You might need to change **line 54** from `os.system('/usr/local/sbin/mover.old start')` to `os.system('/usr/local/sbin/mover start')`
#### Copy script to your preferred location
@ -151,23 +146,19 @@ Now it's time to setup the scheduler when the mover should run.
Go to your unRaid Dashboard to your settings tab and select in the `User Utilities` at the bottom the new plugin you installed `User Scripts`.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!User Scripts](images/Unraid-settings-user-scripts-icon.png)
![!User Scripts](images/Unraid-settings-user-scripts-icon.png)
Select at the bottom `ADD NEW SCRIPT`.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Add New Script](images/Unraid-user-scripts-add-new-script-icon.png)
![!Add New Script](images/Unraid-user-scripts-add-new-script-icon.png)
A popup will appear where you can give it a name, for this example we're going to use `qBittorrent Mover` and then click on `OK`.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!qBittorrent Mover](images/Unraid-user-scripts-add-new-script-enter-name-qbt.png)
![!qBittorrent Mover](images/Unraid-user-scripts-add-new-script-enter-name-qbt.png)
Click in the list on the cogwheel of the new user scrip you made.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Select user script](images/Unraid-settings-user-scripts-list-select-qbit-mover.png)
![!Select user script](images/Unraid-settings-user-scripts-list-select-qbit-mover.png)
Copy/Paste in the new windows that opens the following bash command followed by `SAVE CHANGES`.
@ -183,13 +174,11 @@ echo qbittorrent-mover completed and resumed all paused torrents.
!!! info
Replace the `/mnt/user/data/scripts/mover.py` path to the path where you placed your python script.
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Bash script](images/Unraid-settings-user-scripts-qbit-mover.png)
![!Bash script](images/Unraid-settings-user-scripts-qbit-mover.png)
Select in the schedule list when the script should run, and choose `Custom`
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Set Run Time](images/Unraid-settings-user-scripts-qbit-mover-schedule.png)
![!Set Run Time](images/Unraid-settings-user-scripts-qbit-mover-schedule.png)
After changing to `Custom` you get on the right a extra option where you can setup your cron schedule when it should be run.
@ -197,11 +186,9 @@ For this example we're going to let the script run a 4am at night. `0 4 * * *`
Setup your own schedule [HERE](https://crontab.guru/)
??? check "Screenshot Example - [CLICK TO EXPAND]"
![!Set Run Time](images/Unraid-settings-user-scripts-qbit-mover-cron.png)
![!Set Run Time](images/Unraid-settings-user-scripts-qbit-mover-cron.png)
{! include-markdown "../../../../includes/support.md" !}
<!-- --8<-- "includes/support.md" -->
--8<-- "includes/support.md"
[^1]:
Starr apps = Sonarr/Radarr etc. Doesn't Starr apps sound better then `The arr(s)` ?

Loading…
Cancel
Save