[torrent] match RuTracker album bundle files - #969
Conversation
|
Torrent/usenet album-bundle downloads are already release-level: the selected torrent/NZB downloads the whole album/release. The per-track part happens only after download, during SoulSync’s existing import/post-processing handoff. Current flow:
This PR does not make torrents download per-track. It fixes the current per-track staging handoff by teaching it to understand RuTracker-style release filenames like Longer term, the better architecture would be an album-level manifest matcher:
That would better handle weak filenames, duplicate compilation tracks, durations, disc numbers, and partial/extra files. This PR intentionally avoids that larger redesign and keeps scope limited to making the existing post-download handoff work for common RuTracker album releases. |
|
Sorry, my question is a bit off-topic. However, I can’t help but ask: how do you use rutracker? Prowlarr can’t bypass Cloudflare protection, even with additional plugins. |
|
rutracker works perfectly fine with flaresolver. but soulsync can never really work. as at its core it does per track searching. |
DRAFT:
this is a draft. as i did not test the whole worflow.
i just want to start a discussion. as rutracker is not working with lidarr either.
and i want to know if this is the right approach.
Summary
Fix torrent/usenet album-bundle staging for RuTracker-style releases.
RuTracker music torrents often download files with release-style names instead of clean tags, e.g.:
Nosferatu_-_Beaver_Cleaver.flac01 - 4 Tune Fairytales - Take Me 2 Wonderland (Extended Mix).flacThe album-bundle flow already downloads and stages these files correctly, but
try_staging_match()compared raw filename stems against clean Spotify track titles. That caused staged album files to be missed, especially for compilations and artist-prefixed filenames.Changes
Artist_-_TitleArtist - TitleNN - Artist - TitleNN - TitleTorrentDownloadPlugin.download_album_to_staging()with mocked Prowlarr/torrent-client boundaries.Why
This fixes album downloads where the torrent completes successfully but tracks are not claimed from private staging due to filename/tag mismatch.
Tests
python -m pytest tests/downloads/test_album_bundle_rutracker_integration.py tests/downloads/test_downloads_staging.py -qpython -m ruff check core/downloads/staging.py tests/downloads/test_album_bundle_rutracker_integration.py tests/downloads/test_downloads_staging.pypython -m pytest