Auto-start by default in i2psnark

Description

Relevant IRC logs:

<dg> Can I ask how hard it'd be to get auto-start to be turned on by default in i2psnark?
<dg> It seems redundant to have it off by default
<dg> I've seen people complaining about it, and considering sharing is caring, having more peers and data floating around wouldn't be bad
<dg> or alternatively, a way to save which torrents are turned off and which are turned on and to restore from that save on restart
<dg> (If you have a few torrents stopped and a few started and then you reboot, you get them all started on reboot w/ autostart)
<dg> It seems like only a select few would want autostart off
<dg> It may also benefit the torrent community a bit, considering some can be forgetful etc

<Laughing_Buddha> Why not have some kind of wizard on the first start?
<Laughing_Buddha> It could ask the user what kind of behaviour he wants
<dg> If we had the session saving of which torrents were on (or not), we could reboot and then know which ones the user wanted running or not rather than randomly starting up possibly hundred or thousands of torrents which user did not want seeded/downloaded
<dg> and if we had the ones the user wanted running, it's not harming anybody
<Laughing_Buddha> Also a good idea

<dg> Well, it wouldn't be hard to make it the default but the status thing may need doing and I'm not sure how

To sum up, however:
i2psnark's auto-start should be enabled by default. We could just toggle it to be on by default or we could have code which saves list of running torrents, and on start, i2psnark will read these and start THOSE torrents, instead of accidentally firing up all 1000 of torrents or the like which user did not want running. It could benefit the torrenting community and doesn't seem to make us lose much, maybe lot to gain.

Change History (17)

For example, I have lots of torrents but only run a few. If they all started on router restart that would be bad. Also, when we have router update-via-torrent (coming soon), this would generate complaints if people continue seeding the update after restart. Many people have never used snark, but now they have to go figure out how to delete the update torrent or it will keep running forever.

I see it as user zzz. In addition, each newly created torrent reports at tracker, although it is not yet registered there. But after he was registered with the tracker, the torrent must be turned off in client and then back on, so that the previously dropped connection is re-established.

<dg> If we had the session saving of which torrents were on (or not), we could reboot and then know which ones the user wanted running or not rather than randomly starting up possibly hundred or thousands of torrents which user did not want seeded/downloaded
<dg> and if we had the ones the user wanted running, it's not harming anybody

Doesn't seem high priority but it would be beneficial if it was done. Could benefit the seeding community a little and give some convenience.

Not a bad idea. Unfortunately, we're already pushing the per-torrent config in i2psnark.config to the limit.

Probably best to wait for str4d's Preferences implementation to get merged. Then we can migrate the config to that, and have a more-sophisticated per-torrent config. This would also make it easier to implement e.g. torrent data outside the /i2psnark/ directory.

I didn't bump when I included a probable fix. Sorry.
You'll need to start the torrents manually and then restart to determine if it is fixed.

I can't commit anything else for a few days but with how things looked and zzz's advice, the latest changes (which you should have now) will probably work. The issue is that -12 was still broken, and the bump to -13 means that it was fixed.

Your Snark didn't actually save state correctly because it was in an old version when it shutdown. Thanks for testing, and let me know if it's fixed!