When you upload a torrent the app always tries to whitelist it #186
Replies: 3 comments
-
Hi @josecelano
Yes, but the tracker mode might change over time. That is why the tracker can still update the whitelist while in public mode.
The user would see immediately that there was an error while uploading the torrent (WhitelistingError) if the tracker is offline at that time. So uploads only work while the tracker is online. |
Beta Was this translation helpful? Give feedback.
-
Maybe we can think of another method to keep the whitelist in sync. Especially if we think of scenario's where torrents are delisted from the tracker whitelist outside of the index. |
Beta Was this translation helpful? Give feedback.
-
Hi @WarmBeer, I thought you could upload a torrent anyway because there are other ways to find peers, not only via the associated tracker. But I suppose we are trying to avoid this scenario:
If that's the case, maybe we could upload it anyway but mark it as "pending to whitelist". If you download the torrent, the torrent does not contain the tracker URL. With another worker, we could retry to whitelist the torrent later. In fact, we could make this even the first time to reduce the response time when you upload a torrent. Of course, that requires a lot of work, so I understand that for now, the users are the "workers", and they have to retry later. Regarding the other problem (when the tracker removes a torrent from the whitelist), that is even harder. I guess it does not make sense to have an associated tracker that removes torrents from the whitelist independently. First, we should decide what the index should do in that case. Should the torrent be removed from the index? What do you mean by "keeping the whitelist in sync"? I think we should only remove the tracker URL from the torrent when the tracker removes the torrent from the whitelist. But that would be even harder to implement because, right now, I suppose, the only way to do it is to poll the tracker to get the latest version of the API. @da2ce7 what do you think? |
Beta Was this translation helpful? Give feedback.
-
Hey @WarmBeer, it seems that the app always tries to whitelist the uploaded torrents. And it deleted the uploaded torrent if it can't add it to the whitelist.
Shouldn't we do that only when the tracker runs in
Listed
mode?And why is it deleted if it can't be whitelisted? Even if the tracker is running in
Listed
mode it could be temporarily down. That forces the user to reupload the torrent when the tracker is available again, doesn't it?Link: https://github.com/torrust/torrust-index-backend/blob/develop/src/routes/torrent.rs#L105-L114
Beta Was this translation helpful? Give feedback.
All reactions