Skip to content

rTorrent purge action#3811

Merged
gazpachoking merged 7 commits intoFlexget:developfrom
jasonlyle88:rtorrent_purge_action
Aug 4, 2023
Merged

rTorrent purge action#3811
gazpachoking merged 7 commits intoFlexget:developfrom
jasonlyle88:rtorrent_purge_action

Conversation

@jasonlyle88
Copy link
Copy Markdown
Contributor

Motivation for changes:

rTorrent currently supports adding, updating, and removing a torrent from rTorrent. However, it does not support removing the torrent and the torrent data. This PR adds the ability to specify a purge action for the rTorrent plugin that will both remove the torrent data and remove the torrent from rTorrent

Detailed changes:

  • RTorrent class
    • Add purge_torrent method
  • 'RTorrentOutputPlugin' class
    • Update the action schema enumeration to include purge
    • Add a purge action handler to the on_task_output method
    • Add a purge_entry method for the purge action handler to call that handles the call to the RTorrent class' purge_torrent method
  • Add tests for the rTorrent purge functionality

Config usage if relevant (new plugin or updated schema):

tasks:
   rtorrent_purge:
    from_rtorrent:
      uri: scgi://localhost:5000
    accept_all: yes
    rtorrent:
      uri: scgi://localhost:5000
      action: 'purge'

Log and/or tests output (preferably both):

2023-08-03 16:07:29 VERBOSE  details       rtd             Produced 2 entries.
2023-08-03 16:07:29 VERBOSE  task          rtd             ACCEPTED: `ubuntu-23.04-live-server-amd64.iso` by if plugin because matched requirement: custom1 == 'ubuntu'
2023-08-03 16:07:29 VERBOSE  task          rtd             ACCEPTED: `ubuntu-23.04-desktop-amd64.iso` by if plugin because matched requirement: custom1 == 'ubuntu'
2023-08-03 16:07:29 VERBOSE  details       rtd             Summary - Accepted: 2 (Rejected: 0 Undecided: 0 Failed: 0)
2023-08-03 16:07:30 VERBOSE  rtorrent      rtd             Purged ubuntu-23.04-live-server-amd64.iso (D6B4535BA8F2B34012BC633569F113E77017E032) in rtorrent
2023-08-03 16:07:30 VERBOSE  rtorrent      rtd             Purged ubuntu-23.04-desktop-amd64.iso (443C7602B4FDE83D1154D6D9DA48808418B181B6) in rtorrent

@jasonlyle88 jasonlyle88 marked this pull request as ready for review August 3, 2023 22:15
@jasonlyle88
Copy link
Copy Markdown
Contributor Author

@gazpachoking Noticed the functionality to remove a torrent and its associated data was not available for rTorrent when I was doing my other PR... so just knocked this out real quick as well!

@gazpachoking
Copy link
Copy Markdown
Member

Seems great, thanks again!

@gazpachoking gazpachoking merged commit c1c6781 into Flexget:develop Aug 4, 2023
@jasonlyle88 jasonlyle88 deleted the rtorrent_purge_action branch August 4, 2023 14:30
@jasonlyle88
Copy link
Copy Markdown
Contributor Author

No problem, happy to contribute! I've updated the wiki as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants