Change deluge auto save interval.

General support for problems installing or using Deluge
Post Reply
idiocracy
Seeder
Seeder
Posts: 101
Joined: Tue Jul 23, 2019 11:04 am

Change deluge auto save interval.

Post by idiocracy »

Is there a way to change the deluge 2.1.1 auto save interval, from it's default 3 min to something higher. Without having to manually edit "torrentmanager.py"?

/Windows
mhertz
Moderator
Moderator
Posts: 2331
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Change deluge auto save interval.

Post by mhertz »

The official windows installer is freezed with pyinstaller now, meaning we cannot even edit the python source files at all anymore, as not provided externally like with deluge 1.3.x, or my unofficial 2.x installers. Now we need build deluge with said change in place, freeze, and then can replace the installed deluge.exe which has a compressed archive inside, of the python source-files and a bootloader prepended.

Anyway, I made a plugin for doing this, but was too lazy to add config-file with options to control the intervals, or GTK-UI support for such, and so is just hardcoded to what you previously posted as example i.e. 600/590 secs for state/resume data.

I have tested it works i.e. I changed deluge to print out to terminal whenever doing the state/resume savings and after 10 mins the state saved and 10 secs prior the resuma data saved.

Hope helps.

statefix-0.1.egg

Edit: I can also rebuild your own plugin(AddTorrentCheck) with this change instead, if preferred.
idiocracy
Seeder
Seeder
Posts: 101
Joined: Tue Jul 23, 2019 11:04 am

Re: Change deluge auto save interval.

Post by idiocracy »

Thank you.
But your suggestion might be a better option, to combine those two. People racing typically have a lot of torrents, and saving the resume data for 500+ torrents every 3 min is a bit much. So it kinda makes sense if the option is included in that plugin.

How difficult would it be to make two tick boxes for this setting?
  • Both boxes unticked = disabled = default 3 min.
    First box "Longer auto save interval" = 10 min auto save.
    Second box "Extra long auto save interval = 20 min auto save.
mhertz
Moderator
Moderator
Posts: 2331
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Change deluge auto save interval.

Post by mhertz »

You're welcome mate :)

It wouldn't be difficult, but honestly I hate doing these kinda things(GUI stuff), and neither good at it, so takes me long time to get right and second I have some other thoughts upon how prefer implement it, so hope not to disappointed. When I have made it then will post it in the plugins subforum(statesave plugin) and then ask you here if you still want it joined into yours.

Anyway, I was thinking adding a single input-field, where can add minuttes, and default to 10 or something. Then can change it to whatever - it will be for the state file, and I subtract 10 secs in code from that and use for save time for resume data. I don't wanna make any enabled/disabled functionality in plugin(checkbox) as imho if not wanting the plugin's functionality run then can just disable the plugin's checkbox in deluge preferences regardless.
idiocracy
Seeder
Seeder
Posts: 101
Joined: Tue Jul 23, 2019 11:04 am

Re: Change deluge auto save interval.

Post by idiocracy »

I think combining them is a great idea and makes a lot of sense. I feel like if you're into either of those functionalities, there's a high probability your also into the other.
When suggesting tick boxes, i did not think about disabling through settings, i see now how that was a poor suggestion. If you can do an input field, i think that'll be even better.
mhertz
Moderator
Moderator
Posts: 2331
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Change deluge auto save interval.

Post by mhertz »

Happy to hear that :)

AddTorrentCheck-0.2.egg

I posted also a new plugin under plugins subforum as said earlier.
Post Reply