mirror of
https://github.com/Lidarr/Lidarr.git
synced 2026-03-02 22:56:57 -05:00
Download path fails to update with qBittorrent "Create Subfolder" setting #2779
Labels
No labels
Area: API
Area: Database
Area: Db-migration
Area: Download Clients
Area: Extras
Area: Import Lists
Area: Indexer
Area: Metadata API
Area: Notifications
Area: Organizer
Area: Parser
Area: Scanning
Area: Tooling
Area: UI
Area: Unit Tests
Area: Update API
On Hold: MetadataAPI Blocking
Priority: High
Priority: Low
Priority: Medium
Status: Accepted
Status: Cannot Reproduce
Status: Confirmed
Status: Don't Merge
Status: Help Wanted
Status: In Progress
Status: Info Needed
Status: Investigating
Status: Logs Needed
Status: Maybe One Day
Status: Needs Triage
Status: On Hold
Status: Ready for Review
Status: Unlikely
Status: Waiting for OP
Status: Won't Fix
Type: Bug
Type: Documentation
Type: Duplicate
Type: Enhancement
Type: Enhancement
Type: External Bug
Type: Feature Request
Type: Regression
Type: Support
Type: Support.
conflict
conflict
no-conflict
not-pulled
radarr-pull
readarr-pull
sonarr upstream
sonarr-pull
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Lidarr#2779
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CPU-Blanc on GitHub (Mar 29, 2023).
Is there an existing issue for this?
Current Behavior
When using the "Create Subfolder" setting in qBittorrent, the 'base' path of the torrent does not seem to update in Lidarr, causing issues with using things like Unpackarr to process archives. Lidarr will continue to look at only the original file, and not the new base directory made by qBittorent.
eg: If
downloads/is your download folder, you download a torrent with a single .rar file it'll dodownloads/torrentName/torrentName.rarand will only look there, rather thandownloads/torrentName/Confirmed it's not a permission error as using Manual Import from the queue, it only shows the .rar file. However, navigating to Wanted > Missing > Manual Import and pointing it to the new base folder, it sees the audio files just fine.
Expected Behavior
Lidarr to update to using the new subfolder created by qBitorrent as the torrent destination, allowing extracted files to be properly processed.
Steps To Reproduce
/downloadsTorrent Content Layout>Create Subfolderin qBittorentEnvironment
What branch are you running?
Nightly
Trace Logs?
Manual Import from the Queue:

Manual Import pointing to the base folder from Wanted > Missing:

Torrent structure in qbt (folder is what is added by the settings):

Lidarr Trace logs during scan:

Lidarr Trace logs during queue probe:
From the above, it appears as though Lidarr might be using the
content_pathpayload which is pointing to the original .rar, rather than the base folder for the torrent?@bakerboy448 commented on GitHub (May 15, 2023):
Qbit version? Seems odd it reports the path to the torrent's content as the rar itself
@CPU-Blanc commented on GitHub (May 15, 2023):
Qbt version is in the original post under Environment, 4.5.2
@CPU-Blanc commented on GitHub (Oct 18, 2024):
Hate to bump my own issue, but this is still a problem, and I'm in a completely different environment now. Running everything in docker these days
Exact same issue as above, it's scanning the rar file itself, not the path
@mynameisbogdan commented on GitHub (Oct 18, 2024):
Can you post some recent trace logs then?
Because I use create subfolder too on all my arrs, just not with unpackerr and the OutputPath is set correctly.
Also qBit 5.0.0 should work, but is not quite fully supported as in bug-free as it's a major bump and bugs tend to happen in .0.
@CPU-Blanc commented on GitHub (Oct 18, 2024):
Trace with a forced refresh on the queue, then clicking manual import on the stuck item.
lidarr.trace.txt
root_path appears to be reporting correctly from qbt, but Lidarr just isn't using it?
@mynameisbogdan commented on GitHub (Oct 18, 2024):
root_pathis a new field added quite recently to qBittorrent 5.0.0 bygithub.com/qbittorrent/qBittorrent@3999b9a4f9, so no, we don't use it as it.The arrs are making use of
content_pathwhich isAbsolute path of torrent content (root path for multifile torrents, absolute file path for singlefile torrents).This issue is 100% related to your original bug report, but now you only have Japanese characters in the torrent name and so try to remove them by renaming the torrent in qBittorrent. The filenames in the archive also have Japanese characters?
@CPU-Blanc commented on GitHub (Oct 18, 2024):
I'm not sure I see how that's related. Unpackerr has worked completely as intended, it found the rar and extracted it. Lidarr simply isn't looking for the other files at all. The
content_pathis the rar file itself, not the subfolder containing the rar (and so the extracted folder)So downloading
foo.rarwith subfolders enabled results in/downloads/foo/foo.rar. Unpacker extracts it, resulting indownloads/foo/foo/[...]but Lidarr, instead of scanning/downloads/fooas I'd expect, it is only looking atdownloads/foo/foo.rar.Manual import via Wanted on the subfolder works as expected. It's only in the queue.
In this case. Folder structure on disk:

Lidarr queue:



Queue manual import:
Wanted manual import targeting the subfolder:
@bakerboy448 commented on GitHub (Oct 18, 2024):
And this here is the issue; not supported in Starr I believe.
Also a little unusual for a torrent to only have a single rar and no folder based on what's described
@mynameisbogdan commented on GitHub (Oct 18, 2024):
I'm seeing a bug report with unpackerr having issues with archives having Chinese characters so I'm gonna throw Japanese in the mix too since it's the same Unicode bag.
@bakerboy448 So that's the issue, the single archive file?
root_pathis a way to go around it, but it's going to be a PITA to add support for it aroundNo subfoldersince it might think you want to scan the full downloads folder.@bakerboy448 commented on GitHub (Oct 18, 2024):
Yeah single archive file. Fix would be for qbit content layout to be set to always create subfolder - therefore won't be an issue.
Until qbit v5 stabilizes and documents the api properly - I'd be hesitant to put any qbit v5 specific code or functionality together [outside of the support done for the status renaming]
@CPU-Blanc commented on GitHub (Oct 18, 2024):
Yes, the torrent in question is just a single .rar file with no parent folder, I was hoping by using the
always create subfolderoption in qbt it could ensure consistency between torrents.You could perhaps some logic in arr to walk upwards from the content_path until the parent of the current path is the save_path?
ie:
/downloads/foo.mp4=/downloads/foo.mp4,downloads/foo/foo.mp4=downloads/fooAt least that way it should be backwards compatible?
@CPU-Blanc commented on GitHub (Oct 18, 2024):
It is set to always create subfolder
@davidnewhall commented on GitHub (Apr 12, 2025):
I added the
root_pathto the qbittorrent output, so we could overcome this issue through Lidarr into Unpackerr.https://github.com/qbittorrent/qBittorrent/pull/21066
Just needs to be added to Sonarr and ported to the rest.