Skip to content

Commit 4826942

Browse files
committed
feat: add qui-xseed.sh for qui-based cross-seed triggering
Replaces the legacy xseed.sh (removed in v4.0.0) with a qui-native implementation that triggers data-based cross-seed searches via the qui API when Radarr or Sonarr completes an import. Key changes: - Only ERROR/WARNING written to stderr (starr captures stderr as error-level logs, causing noisy notifications for INFO lines) - Creates dir-scan entry, triggers scan, polls for completion - Idempotent via ID log file (duplicate download IDs skipped) - Updated README with full configuration documentation
1 parent 1053dc8 commit 4826942

3 files changed

Lines changed: 492 additions & 46 deletions

File tree

.env.sample

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
# .env
2-
# Environment Configuration StarrScripts Sample 2024-04
3-
# Rename this file to .env and fill in the values accordingly.
4-
# Xseed
5-
## Download Client Names
2+
# Environment Configuration StarrScripts
3+
# qui-xseed
4+
5+
## Download Client Names (as named in Radarr/Sonarr Settings > Download Clients)
66
### For multiple clients, use format: "client1,client2,client3"
77
### Do not include extra spaces around commas!
8-
TORRENT_CLIENTS="" # Examples: "Qbit", "Qbit,Deluge"
8+
TORRENT_CLIENTS="" # Examples: "qBittorrent", "qBittorrent,Deluge"
99
USENET_CLIENTS="" # Examples: "SABnzbd", "SABnzbd,SABnzbd Anime"
10-
## Cross Seed API configuration
11-
XSEED_HOST="" # Example: "crossseed"
12-
XSEED_PORT="" # Example: "2468"
13-
## API Key for Cross Seed, if applicable
14-
XSEED_APIKEY="" # Example: "your-api-key"
15-
## Path to store the script's database of prior searches
16-
LOG_FILE="" # Example: "/config/xseed_db.log"
17-
LOGID_FILE="" # Example: "/config/xseed-id.log"
10+
11+
## qui API configuration (container name and port)
12+
QUI_HOST="" # Example: "qui"
13+
QUI_PORT="" # Example: "7476"
14+
15+
## API Key for qui
16+
QUI_APIKEY="" # Example: "your-api-key"
17+
18+
## Target Instance ID (from qui dashboard URL)
19+
QUI_TARGET_INSTANCE_ID="" # Example: "1"
20+
21+
## qBittorrent Path Prefix (optional)
22+
# If arr apps and qBittorrent have different path mappings, specify
23+
# the prefix from qBittorrent's perspective here. Leave empty if
24+
# qui/qBittorrent and the arrs share the same file paths.
25+
QUI_QBIT_PATH_PREFIX="" # Example: "/data/downloads"
26+
27+
## qBittorrent Tags (optional, comma-separated)
28+
QUI_TAGS="" # Example: "cross-seed,qui-inject"
29+
30+
## Log paths (empty = defaults to script directory)
31+
LOG_FILE=""
32+
LOGID_FILE=""
1833
# ZFS Destory
1934
VERBOSE=0
2035
MAX_FREQ=2

README.md

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,34 @@ error.
1111

1212
## Scripts Overview
1313

14-
### Cross-Seed Category Filter for Qbittorrent
14+
### qui Cross-Seed Trigger for Starr Apps
1515

16-
> This script has been removed and is no longer supported as part of Bakerboy448's v4.0.0 purge.
17-
> Please see the [v4.0.0 Release Notes](https://github.com/bakerboy448/StarrScripts/releases/tag/v4.0.0)
18-
19-
- **Script:** `xseed_qbit_cat_filter.sh`
20-
- **Description:** Filters cross-seed requests by categories or trackers for execution by Qbittorrent.
21-
- **Instructions:** Open the file in a text editor and modify the variable definitions at the top of the script, then replace the "Execute on completion" command in qBittorrent with the one given in the notes at the top of the script.
22-
- **Creator:** [zakkarry](https://github.com/zakkarry)
23-
- **Usage:** Execute the script to filter categories or trackers as needed in Qbittorrent setups.
24-
25-
### Cross-Seed Trigger for Starr Apps
26-
27-
> This script has been removed and is no longer supported.
28-
> Please see the [v4.0.0 Release Notes](https://github.com/bakerboy448/StarrScripts/releases/tag/v4.0.0)
29-
30-
- **Script:** `xseed.sh`
31-
- **Description:** Triggers a cross-seed search post-import or post-upgrade in Starr applications.
32-
- **Creator:** [Bakerboy448](https://github.com/bakerboy448/) with assistance and many improvements from [zakkarry](https://github.com/zakkarry)
33-
- **Instructions**
34-
1. If using environmental variables file, copy `.env.sample` to `.env`.
35-
2. If not using `.env`, open the script in a text editor and modify the required values under "# Xseed" header.
36-
3. Ensure that your download client's _NAME_ in the Download Client section of the respective \*arr match the variables in the script.
37-
4. Docker Users: Mount `.env` and `xseed.sh` to your Starr's `/config` mount.
38-
5. In your \*arr, navigate to `Settings` -> `Connect` and add a "Custom Script" for the "On Import Complete" for Sonarr and "On File Import" and "On File Upgrade" for Radarr.
39-
6. Test and Save.
40-
41-
### Cross-Seed Updater
42-
43-
> This script has been removed and is no longer supported.
44-
> Please see the [v4.0.0 Release Notes](https://github.com/bakerboy448/StarrScripts/releases/tag/v4.0.0)
45-
46-
- **Script:** `xseed-update.sh`
47-
- **Description:** Updates the [Cross-Seed](https://github.com/cross-seed/cross-seed) tool to its latest version.
16+
- **Script:** `qui-xseed.sh`
17+
- **Description:** Triggers a [qui](https://github.com/qui-lern/qui) data-based cross-seed search when Radarr or Sonarr completes an import. The script creates a dir-scan entry in qui, triggers a scan, polls for completion, then cleans up.
18+
- **Creator:** [Bakerboy448](https://github.com/bakerboy448/)
19+
- **Requirements:**
20+
- [qui](https://github.com/qui-lern/qui) with API access enabled
21+
- Radarr/Sonarr with Custom Script connect support
22+
- **Instructions:**
23+
1. Copy `.env.sample` to `.env` and configure the `QUI_*` variables.
24+
2. Docker Users: Mount `.env` and `qui-xseed.sh` to your Starr's `/config` mount.
25+
3. In Radarr: `Settings` -> `Connect` -> `Custom Script` -> select "On Import" and "On Upgrade".
26+
4. In Sonarr: `Settings` -> `Connect` -> `Custom Script` -> select "On Import Complete".
27+
5. Test and Save.
28+
- **Configuration (`.env`):**
29+
- `QUI_HOST` - qui hostname (default: `localhost`)
30+
- `QUI_PORT` - qui API port (default: `7476`)
31+
- `QUI_APIKEY` - qui API key
32+
- `QUI_TARGET_INSTANCE_ID` - qui instance ID (default: `1`)
33+
- `QUI_QBIT_PATH_PREFIX` - optional path prefix for qBittorrent
34+
- `QUI_TAGS` - optional comma-separated tags
35+
- `TORRENT_CLIENTS` - comma-separated torrent client names (default: `qBittorrent`)
36+
- `USENET_CLIENTS` - comma-separated usenet client names (default: `SABnzbd`)
37+
- `LOG_FILE` - log file path (default: `./qui_xseed.log`)
38+
- **Notes:**
39+
- Only errors are written to stderr (which starr apps capture). All other logging goes to the log file only, to avoid noisy notifications.
40+
- The script is idempotent — duplicate download IDs are skipped via the ID log file.
41+
- Replaces the legacy `xseed.sh` (removed in v4.0.0) which used the cross-seed API directly.
4842

4943
### Duplicate File Manager
5044

0 commit comments

Comments
 (0)