|
1 | | -# StarrScripts |
2 | | - |
3 | | -A curated collection of scripts to optimize and manage various functions related to Starr applications and associated tools. |
4 | | -Occasionally holds random useful scripts as well. |
5 | | -These scripts are designed to enhance functionality, improve management, and automate routine tasks. |
6 | | -All scripts are **Created By: [Bakerboy448](https://github.com/bakerboy448/) unless otherwise noted.** |
7 | | - |
8 | | -**Warning**: Do not edit files on Windows that will be executed on Linux without ensuring the line-endings are set to `LF`. |
9 | | -This means that `CRLF` cannot be used in .sh scripts. Bash scripts will not execute properly and you will receive an |
10 | | -error. |
11 | | - |
12 | | -## Scripts Overview |
13 | | - |
14 | | -### qui Cross-Seed Trigger for Starr Apps |
15 | | - |
16 | | -- **Script:** `qui-xseed.sh` |
17 | | -- **Description:** Triggers a [qui](https://github.com/autobrr/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/autobrr/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. |
42 | | - |
43 | | -### Duplicate File Manager |
44 | | - |
45 | | -- **Script:** `dupe.sh` |
46 | | -- **Description:** Executes `jdupes` to find and manage duplicate files in the specified directory. |
47 | | -- **Instructions:** |
48 | | - 1. Copy `.env.sample` to `.env`. |
49 | | - 2. Populate required values under "# Jdupes" header. |
50 | | - 3. Review and adjust script parameters to fit your use case. |
51 | | -- **Output:** Results are saved to a file as specified in the script. |
52 | | - |
53 | | -### Merge Folders Utility |
54 | | - |
55 | | -- **Script:** `merge_folders.py` |
56 | | -- **Description:** A robust utility designed for merging multiple directories into a single target directory, ensuring that no existing files are overwritten in the process. This script uses a recursive function to efficiently merge content, while providing detailed logging of each step to monitor the creation, movement, and skipping of files and directories. |
57 | | -- **Features:** |
58 | | - - **Recursive Merging:** Seamlessly combines contents of source directories into a target directory. |
59 | | - - **Non-destructive:** Preserves existing files by not overwriting them. |
60 | | - - **Error Handling:** Captures and logs errors during the merging process, ensuring reliable operations. |
61 | | - - **Detailed Logging:** Tracks and logs every file and directory operation, providing clear visibility into the process. |
62 | | -- **Usage Case:** Ideal for consolidating data in scenarios like organizing media libraries, merging data backups, or simplifying file system structures. |
63 | | -- **Instructions:** |
64 | | - 1. Update `source_dirs` and uncomment the variable |
65 | | - 2. Update `target_dir` and uncomment the variable |
66 | | - 3. Uncomment `atomic_moves` to engage the movement operation |
67 | | - 4. Run the script with `python3 merge_folders.py` |
68 | | - |
69 | | -### Plex Image Cleanup Updater |
70 | | - |
71 | | -- **Script:** `pic-update.sh` |
72 | | -- **Description:** Updates [Plex-Image-Cleanup](https://github.com/meisnate12/Plex-Image-Cleanup) to the latest branch. |
73 | | -- **Review:** Check that script parameters are suitable for your environment. |
74 | | - |
75 | | -### Plex Meta Manager Updater |
76 | | - |
77 | | -- **Script:** `pmm-update.sh` |
78 | | -- **Description:** Updates [Plex Meta Manager](https://github.com/meisnate12/Plex-Meta-Manager) to the latest branch. |
79 | | -- **Review:** Confirm script parameters align with your configuration. |
80 | | - |
81 | | -### QbitManage API Trigger |
82 | | - |
83 | | -- **Script:** `qbm-api-trigger.sh` |
84 | | -- **Description:** Triggers [QbitManage](https://github.com/StuffAnThings/qbit_manage) commands via Web API for specific torrent hashes. |
85 | | -- **Requirements:** |
86 | | - - QbitManage v4.5+ with Web API enabled (`QBT_WEB_SERVER=true`) |
87 | | - - QbitManage container accessible via HTTP |
88 | | -- **Instructions:** |
89 | | - 1. Configure QbitManage Web API in your docker-compose.yml |
90 | | - 2. In qBittorrent, navigate to `Options` -> `Downloads` -> `Run external program on torrent completion` |
91 | | - 3. Add command: `/path/to/qbm-api-trigger.sh %I` |
92 | | - 4. The `%I` variable passes the torrent hash to trigger commands like `tag_update`, `share_limits`, `rem_unregistered`, and `recheck` |
93 | | -- **Notes:** |
94 | | - - Script sends POST request to `http://127.0.0.1:4269/api/run-command` by default |
95 | | - - Modify `API_URL` and `COMMANDS` variables in script to customize behavior |
96 | | - - All execution details logged to `run_qbit_manage_commands.log` |
97 | | - |
98 | | -### QbitManage Updater |
| 1 | +--- |
| 2 | +title: StarrScripts |
| 3 | +--- |
99 | 4 |
|
100 | | -- **Script:** `qbm-update.sh` |
101 | | -- **Description:** Updates [QbitManage](https://github.com/StuffAnThings/qbit_manage) to the latest branch. |
102 | | -- **Review:** Ensure script parameters match your setup before execution. |
103 | | - |
104 | | -### Servarr Bot Merger |
105 | | - |
106 | | -- **Script:** `servarr/servarr_bot_merge.sh` |
107 | | -- **Description:** Merges the latest changes from the Servarr Wiki Bot Branch into the Prowlarr Indexers Wiki Master. |
108 | | - |
109 | | -### Backup Config |
110 | | - |
111 | | -- **Script:** `backup_config.sh` |
112 | | -- **Description:** Backs up configuration directories to a compressed archive. |
113 | | - |
114 | | -### Fail2ban Config Dump |
115 | | - |
116 | | -- **Script:** `f2b-dump.sh` |
117 | | -- **Description:** Dumps Fail2ban configuration details to a temporary file for review. |
118 | | - |
119 | | -### Omegabrr Updater |
120 | | - |
121 | | -- **Script:** `omegabrr_upgrade.sh` |
122 | | -- **Description:** Upgrades [Omegabrr](https://github.com/autobrr/omegabrr) to the latest version. |
123 | | - |
124 | | -### Radarr Duplicate Finder |
125 | | - |
126 | | -- **Script:** `radarr_dupefinder.sh` |
127 | | -- **Description:** Finds duplicate files in Radarr library directories. |
128 | | - |
129 | | -### Sonarr Duplicate Finder |
130 | | - |
131 | | -- **Script:** `sonarr_dupefinder.sh` |
132 | | -- **Description:** Finds duplicate files in Sonarr library directories. |
133 | | - |
134 | | -### ZFS Snapshot Cleanup |
135 | | - |
136 | | -- **Script:** `zfsburn.sh` |
137 | | -- **Description:** Deletes ZFS autosnapshots older than a specified number of days. |
138 | | -- **Instructions:** |
139 | | - 1. Copy `.env.sample` to `.env`. |
140 | | - 2. Fill in the required values under "# ZFS Destroy" header. |
141 | | - |
142 | | -## Contributors |
143 | | - |
144 | | -<a href="https://github.com/baker-scripts/StarrScripts/graphs/contributors"> |
145 | | - <img src="https://contrib.rocks/image?repo=baker-scripts/StarrScripts" alt="Contributors" /> |
146 | | -</a> |
| 5 | +# StarrScripts |
147 | 6 |
|
148 | | -Contributions to improve or expand the scripts collection are welcome. Please [open an issue](https://github.com/baker-scripts/StarrScripts/issues) for more information. |
| 7 | +Bash scripts for Starr apps (Radarr, Sonarr, Lidarr, Readarr): custom formats, naming, duplicate management, and update automation. |
149 | 8 |
|
150 | | -## Disclaimer |
| 9 | +<div class="bs-actions" markdown="0"> |
| 10 | + <a class="bs-btn bs-btn--primary" href="https://github.com/baker-scripts/StarrScripts">View on GitHub →</a> |
| 11 | +</div> |
151 | 12 |
|
152 | | -These scripts are provided as-is with no warranty. Scripts may delete files, modify configurations, or interact with external APIs. Always review scripts before running and test in a non-production environment first. The authors are not responsible for any data loss or issues resulting from their use. |
| 13 | +## Highlights |
153 | 14 |
|
154 | | -## License |
| 15 | +- `qui-xseed.sh`: triggers a [qui](https://github.com/autobrr/qui) cross-seed search when Radarr or Sonarr finishes an import. |
| 16 | +- `qbm-api-trigger.sh`: fires [QbitManage](https://github.com/StuffAnThings/qbit_manage) commands per torrent hash via the Web API. |
| 17 | +- Radarr and Sonarr duplicate finders, plus a non-destructive folder-merge utility. |
| 18 | +- Updater scripts for QbitManage, Kometa, Omegabrr, and Plex-Image-Cleanup. |
| 19 | +- Housekeeping: ZFS snapshot cleanup, config backup, fail2ban config dump. |
155 | 20 |
|
156 | | -[MIT](https://github.com/baker-scripts/StarrScripts/blob/main/LICENSE) |
| 21 | +Full script list, requirements, and configuration: **[GitHub README →](https://github.com/baker-scripts/StarrScripts#readme)** |
0 commit comments