Deluge: Modify AutoRemovePlus Plugin to delete dead torrents based on Availability

6 Responses

  1. TomH says:

    When deluge starts it does not have all availability yet and so it’s 0.0 and it pauses most of my torrents.
    So, I’m afraid to use it with remove torrents because alive torrents might get deleted along with the dead ones.
    Any way to start this plugin maybe 5 minutes after deluge starts?

    • Abir Pathak says:

      Actually that shouldn’t be happening. In core.py on line 117 as the comments explain, they have used deferLater.

              # it appears that if the plugin is enabled on boot then it is called
              # before the torrents are properly loaded and so do_remove receives an
              # empty list. So we must listen to SessionStarted for when deluge boots
              #  but we still have apply_now so that if the plugin is enabled
              # mid-program do_remove is still run
              self.looping_call = LoopingCall(self.do_remove)
              deferLater(reactor, 5, self.start_looping)
      

      This means that it should start looping after 5 seconds. You can try increasing the number of seconds to more to see if that helps. Do you have a lot of torrents running?

      • TomH says:

        Yes, actually I have about 500 torrents running. I’ll try increasing the deferLater time to maybe 20 seconds and see. Thanks.

        • Abir Pathak says:

          Ok. I see. This large number of torrents could be why deluge is taking so long to identify the Availability for all torrents. Try increasing the seconds to however long you think it takes for deluge to analyze all your torrents. Hope it works 🙂

  2. Ryan says:

    Is there any way to make this a standalone plugin? I already utilize AutoRemovePlus and don’t want to lose that.

    On another note, I’m trying to use this through the webui on a headless rpi3 and can’t seem to get it to work even replacing the original.

  3. Jools says:

    Why not make a pull request to the original?

Leave a Reply

Your email address will not be published. Required fields are marked *