Web seeds handling issues
Due to the fact that libtorrent can add/remove web seeds on its own, I ran into some problems:
- The only reliable way to obtain updated list of web seeds is polling, which is not the best option in some scenarios (especially due the way it is getting from
libtorrent). Although I can find out about the removal of some web seed, since it is accompanied byurl_seed_alertalert, the addition of new one occurs without any alerts. - There is no (convenient) way for application/user to distinguish 'ephemeral' web seeds.
- When 'ephemeral' web seeds are added (e.g. due to redirection) the original ones are removed in some cases. The problem that the 'ephemeral' web seeds aren't stored in resume data so they can be lost unexpectedly: https://github.com/arvidn/libtorrent/blob/356219bda36077329051b68ca253db9e7de1932d/src/http_seed_connection.cpp#L336-L340
And generally, is it a good idea to remove the web seeds that were originally there (coming from a torrent file, for example) or added by the user, even in case of an error? In addition, the error may be temporary, for example, due to current network problems, isn't it?
Really good observations. It would make more sense to have some disabled-flag for the original web seed, rather than removing it.
And more alerts for these events too.
Another problem I noticed: if I have some torrent with files renamed locally, libtorrent requests them from the web seed using these changed names, which is incorrect, since the web seed only knows about the original names.
@glassez It's strange that I haven't seen this behavior in my 1.2.16 version. But if it does happen, it needs to be corrected. Because there can be many reasons for renaming files when downloading, but the torrent file does not change from that.
if I have some torrent with files renamed locally, libtorrent requests them from the web seed using these changed names
Does this happen for multi-file torrents, or just single file ones? I discovered a bug in the single-file torrent handling.
https://github.com/arvidn/libtorrent/pull/7339
if I have some torrent with files renamed locally, libtorrent requests them from the web seed using these changed names
Does this happen for multi-file torrents, or just single file ones? I discovered a bug in the single-file torrent handling.
As far as I remember, it was single file torrent when I noticed this problem. I do not know if multiple ones are affected.
#7339
A good start. Unfortunately, I don't have the opportunity to test this with real web seeds.
Well, it remains to add an alert about new (ephemeral) web seeds. And also provide the user with something more detailed than just web seed urls, so that it will provide an idea of which web seeds are permanent and which are ephemeral.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
1