Opened 12 years ago

Closed 12 years ago

#2898 closed Enhancement (fixed)

Add pausing and deletion to daemon

Reported by: Longinus00 Owned by: Longinus00
Priority: Normal Milestone: 2.00
Component: Transmission Version: 1.83
Severity: Normal Keywords: feature-disparity patch
Cc:

Description

This is an attempt to duplicate the functionality supplied by the gui clients which allows pausing and deletion of added torrents.

Attachments (7)

daemonFunc.diff (4.0 KB) - added by Longinus00 12 years ago.
This only modifies daemon.c
daemonFunc3.diff (4.5 KB) - added by Longinus00 12 years ago.
Adds commands to rpc and remote
daemonsyncWeb.diff (2.4 KB) - added by Longinus00 12 years ago.
Syncs the pause option in clutch with the option in the daemon
daemonFunc2.diff (8.1 KB) - added by Longinus00 12 years ago.
This adds pausing and deletion variables to the session variable.
daemonFunc5.patch (4.0 KB) - added by Longinus00 12 years ago.
Makes gtk+ use the session variables.
daemonFunc6.patch (2.8 KB) - added by Longinus00 12 years ago.
Makes qt use the session variables.
pauseDelete.patch (27.8 KB) - added by Longinus00 12 years ago.
combined patch

Download all attachments as: .zip

Change History (17)

comment:1 Changed 12 years ago by Longinus00

My current patch only modifies daemon.c but I think it is rather inelegant and relies on globals. A better idea would be to actually implement this in libtransmission by saving these values in the session variable. Seeing as how the gui clients would need to be modified to take this into account, I thought it would be best to start off with this.

comment:2 Changed 12 years ago by Longinus00

I've created a patch that stores the data in the session. I tried to keep consistent with the contrary naming scemes of the key "start-added-torrents" and the preexisting function "tr_ctorSetPaused" as I had in the last patch. This method has the added bonus of making torrents added via rpc follow the pausing scheme set up in the client (before they would always start running). I left deletion up to the daemon and not libtransmission.

In the course of doing this I noticed a new bug in watch.c using ionotify. It seems as though ionotify will return a new file twice. If you have the daemon setup to delete the torrent file on import, it will try to reopen the deleted file. It subsequently fails and logs the attempt. There doesn't appear to be any harm in this but it should probably be fixed.

comment:3 Changed 12 years ago by Longinus00

I was browsing through the buglist and I think that my second patch would fix this bug http://trac.transmissionbt.com/ticket/1295

comment:4 Changed 12 years ago by Longinus00

Partially fix it anyway.

Changed 12 years ago by Longinus00

This only modifies daemon.c

Changed 12 years ago by Longinus00

Adds commands to rpc and remote

Changed 12 years ago by Longinus00

Syncs the pause option in clutch with the option in the daemon

Changed 12 years ago by Longinus00

This adds pausing and deletion variables to the session variable.

Changed 12 years ago by Longinus00

Makes gtk+ use the session variables.

Changed 12 years ago by Longinus00

Makes qt use the session variables.

comment:5 Changed 12 years ago by Longinus00

So this is about as much as I can do with this. I don't know objc so I can't implement the mac client also using the session variables. Basically, apply every patch here except 'daemonFunc.diff' as that doesn't use the session variables and so won't help solve ticket #1295.

comment:6 Changed 12 years ago by charles

  • Keywords feature-disparity added

comment:7 Changed 12 years ago by charles

  • Keywords patch added

Changed 12 years ago by Longinus00

combined patch

comment:8 Changed 12 years ago by charles

  • Milestone changed from None Set to 2.00
  • Status changed from new to assigned

comment:9 Changed 12 years ago by charles

  • Component changed from libtransmission to Transmission
  • Owner changed from charles to Longinus00
  • Status changed from assigned to new

comment:10 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.