You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-11Lines changed: 30 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,10 @@ Automated Lidarr queue cleanup with agentic oversight. Runs daily at 2 AM via cr
41
41
|**Force import**| Albums that failed auto-import but should still work — re-attempts via Lidarr's manual import API with `move` mode |
42
42
|**Delete + re-search**| Genuinely broken downloads are removed from queue and Lidarr re-searches for a better copy |
43
43
|**Agent oversight**| Ambiguous or low-confidence items get flagged with `[AGENT_OVERSIGHT_NEEDED]` for human/AI review |
44
-
|**Stalled download cleanup**| qBittorrent/Soulseek downloads stuck for N+ days are removed and re-searched |
44
+
|**Stalled download cleanup**| qBittorrent/Soulseek/YouTube downloads stuck for N+ days are removed and re-searched |
45
45
|**Missing album scan**| Scans the oldest N missing albums for ones that have been repeatedly searched but never grabbed (likely naming/indexer issues) |
46
+
|**Unmapped files cleanup**| Deletes orphaned track files that are no longer linked to any album in Lidarr |
47
+
|**Tubifarry integration**| Per-download-client config for Slskd2/Soulseek, YouTube, Lucida — handles retrying downloads, lower match thresholds, stale timeout overrides |
46
48
|**Config-driven logic**| All error pattern matching is controlled by a `CONFIG` dict at the top of the script — move keywords between lists to change behavior without touching logic |
47
49
|**Direct Lidarr API**| No MCP server dependency — talks directly to Lidarr's REST API |
48
50
@@ -152,9 +154,35 @@ CONFIG = {
152
154
|`missing_album_scan_count`|`10`| How many of the oldest missing albums to check per run. Kept low to avoid API rate issues. |
153
155
|`missing_search_threshold`|`2`| If a missing album has been searched this many times with zero successful grabs, flag it as a potential naming issue. |
154
156
157
+
### Tubifarry Integration
158
+
159
+
[Tubifarry](https://github.com/TypNull/Tubifarry) is a Lidarr plugin that adds download sources beyond traditional indexers. It registers custom download clients in Lidarr — this script handles each one with specific behavior:
160
+
161
+
| Download Client | Source | Stale days | Match min % | Retrying detection |
| Any other client | — | 14 (global default) | 30% (global default) | — |
167
+
168
+
**Slskd2 / Soulseek**: Soulseek downloads can stall when the peer goes offline. Lidarr reports this with `errorMessage: "Some files failed. Retrying download..."`. The script detects this specific pattern and if the download has been retrying for 14+ days (configurable via `retrying_delete_days`), it removes it from the queue and triggers a new search. Fresh retrying downloads (<14d) are left alone to give the peer time to come back.
169
+
170
+
**YouTube**: YouTube audio extraction should finish quickly — if a YouTube download is stuck for more than 3 days, it's likely dead. YouTube audio is often lower quality, so the match % threshold for force import is lowered to 15%.
171
+
172
+
**Lucida**: Multi-source web downloader. 7-day stale threshold with 20% match minimum.
173
+
174
+
If you add more Tubifarry web clients (DABmusic, T2Tunes, Subsonic, etc.), just add an entry to `client_overrides`:
175
+
176
+
```python
177
+
"DABmusic": {
178
+
"stale_download_days": 7,
179
+
"match_import_min": 25,
180
+
},
181
+
```
182
+
155
183
### Client Overrides
156
184
157
-
You can set different thresholds per download client. This is useful because different sources have different behavior:
185
+
You can set different thresholds per download client (**see [Tubifarry Integration](#tubifarry-integration) above for the built-in values**). This is useful because different sources have different behavior:
158
186
159
187
| Setting | What it does |
160
188
|---------|-------------|
@@ -163,15 +191,6 @@ You can set different thresholds per download client. This is useful because dif
163
191
|`retrying_message`| If set, the script checks `errorMessage` for this pattern to detect "retrying" state |
164
192
|`retrying_delete_days`| Delete if retrying for this many days (separate from stale) |
0 commit comments