Log all the original uploaded torrents #272
Replies: 1 comment 2 replies
-
Solution 1We can store the original torrent file in a log folder: We can use a hash of the torrent file as the file name: Ideally, the frontend should calculate the hash so we do not have to consume the server CPU on that task. We could also use a feature flag and let the admin decide if they want this feature enabled or not. These would lead to some other advantages. If we change the frontend we could split the upload process in two steps (for the user or only internally for the API requests). In the first step, we calculate the hash and then we try to make a pre-request to add the new torrent to the index. The pre-request can only contain the metadata info: title, description, category, tags, and the hash of the real torrent file. The second request is to upload only the binary file or, again, the whole metadata plus the binary file. We can start storing the hash in the Index and avoid duplicate uploads for the same torrent file. Although this feature should be considered if we store the original torrent file not only as a log artefact but as a first-class app entity. |
Beta Was this translation helpful? Give feedback.
-
Today, we discussed in our weekly meeting about losing information with the current index behaviour. We do not store the original uploaded torrent file data, and that could lead to two main problems:
Context
When you upload a torrent, the Index does not store all the information the torrent file has. We remove non-standard fields from the torrent file, and we store the standard fields in the database.
The most simple torrent could look like this in json format:
the_most_simple_torrent.zip
As you can see, it has a
custom
field in theinfo
dictionary. As that is a non-standard field, we do not store it in the database, and that information is lost forever.We want to store that information because:
info
dictionary. I'm already working on a new feature to store at least the original info-hash.We can add the solution discussed below or add more solutions.
cc @da2ce7 @mario-nt @grmbyrn
Beta Was this translation helpful? Give feedback.
All reactions