Skip to content

Commit 6604784

Browse files
committed
Document Tubifarry integration: Slskd retrying, YouTube, Lucida behaviors
1 parent 4ef874d commit 6604784

1 file changed

Lines changed: 30 additions & 11 deletions

File tree

README.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ Automated Lidarr queue cleanup with agentic oversight. Runs daily at 2 AM via cr
4141
| **Force import** | Albums that failed auto-import but should still work — re-attempts via Lidarr's manual import API with `move` mode |
4242
| **Delete + re-search** | Genuinely broken downloads are removed from queue and Lidarr re-searches for a better copy |
4343
| **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 |
4545
| **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 |
4648
| **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 |
4749
| **Direct Lidarr API** | No MCP server dependency — talks directly to Lidarr's REST API |
4850

@@ -152,9 +154,35 @@ CONFIG = {
152154
| `missing_album_scan_count` | `10` | How many of the oldest missing albums to check per run. Kept low to avoid API rate issues. |
153155
| `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. |
154156

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 |
162+
|----------------|--------|-----------|-------------|--------------------|
163+
| `Slskd2` | Soulseek (via slskd) | 14 | 20% | `"Some files failed. Retrying download"` → delete after 14d |
164+
| `Youtube` | YouTube audio (via yt-dlp) | 3 | 15% ||
165+
| `Lucida` | Multi-source web client | 7 | 20% ||
166+
| 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+
155183
### Client Overrides
156184

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:
158186

159187
| Setting | What it does |
160188
|---------|-------------|
@@ -163,15 +191,6 @@ You can set different thresholds per download client. This is useful because dif
163191
| `retrying_message` | If set, the script checks `errorMessage` for this pattern to detect "retrying" state |
164192
| `retrying_delete_days` | Delete if retrying for this many days (separate from stale) |
165193

166-
**Built-in overrides:**
167-
168-
| Client | Stale days | Match min % | Retrying |
169-
|--------|-----------|-------------|----------|
170-
| `Slskd2` (Soulseek) | 14 | 20% | "Some files failed. Retrying download" → delete after 14d |
171-
| `Youtube` (Tubifarry) | 3 | 15% ||
172-
| `Lucida` | 7 | 20% ||
173-
| Everything else | 14 (global) | 30 (global) ||
174-
175194
To add or modify a client, edit the `client_overrides` dict:
176195

177196
```python

0 commit comments

Comments
 (0)