Opened 10 years ago
Closed 8 years ago
#5077 closed Bug (fixed)
Remove .torrent doesn't work on watchdir
Reported by: | rb07 | Owned by: | mike.dld |
---|---|---|---|
Priority: | Normal | Milestone: | 2.90 |
Component: | Qt Client | Version: | 2.71 |
Severity: | Normal | Keywords: | watchdir |
Cc: |
Description
The preference setting doesn't have the effect expected when the options panel is not used.
The remove .torrent file logic is all in the Options and FileAdded? classes, the signal 'executed' is probably sent from Session, but there is no FileAdded? object to catch it.
To test:
- Preference "auto. add torrents from" enabled and set.
- Preference "remove .torrent" set.
- Preference "start when added" set.
- Preference "show options dialog" not set.
Add a .torrent file to the watch directory.
Result: torrent is added, but the file is not deleted.
Attachments (3)
Change History (12)
comment:1 Changed 10 years ago by rb07
Changed 10 years ago by rb07
comment:2 Changed 10 years ago by rb07
Hold on, I seem to have broken all .torrent file deletions, except those on the watchdir.
comment:3 Changed 10 years ago by rb07
Nope, I didn't break anything, its the same bug I was fixing but in a different place (TrMainWindow::addTorrent with no Options panel has no FileAdded object to do the removing).
I'll post a new patch (fixing both bugs) later, after I test the changes.
comment:4 Changed 10 years ago by jordan
rb07, the new code in app.cc and mainwin.cc look very similar to each other and to the code in options.cc, at least superficially. Do you think it make sense to extract any of it into a standalone function that all three blocks could use?
comment:5 Changed 10 years ago by rb07
Jordan, Yes (I even copied the comment ;-), I was thinking along the same line, maybe push the functionality into the Session class?
I don't think it is straightforward, but looks like it could be the common point in the execution flow (only Options goes directly to libtransmission, doing something very similar to Session::addTorrent, but with more parameters sent... and I already started by adding the tag parameter).
comment:6 follow-up: ↓ 7 Changed 10 years ago by jordan
Session is probably the right place for this. Do you want to take the first shot at it? :)
comment:7 in reply to: ↑ 6 Changed 10 years ago by rb07
Replying to jordan:
Session is probably the right place for this. Do you want to take the first shot at it? :)
Done.
comment:8 Changed 8 years ago by mike.dld
- Owner changed from jordan to mike.dld
- Status changed from new to assigned
comment:9 Changed 8 years ago by mike.dld
- Milestone changed from None Set to 2.90
- Resolution set to fixed
- Status changed from assigned to closed
Thanks, committed as r14349. Some modifications were required though (things changed in 2 years) and I optimized it a bit as well.
Fixed with the attached patch.
Corrections to the description: