New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Priority for piece validation #2082
Comments
Hi @ThaUnknown, I can understand the use for this feature, but with how the As a workaround, in some cases if it's safe to assume that the store hasn't been modified, the Additionally, if the content is already downloaded and in a local storage, would it be possible to have these added and loaded to the client to prior to the attempt to load the content? - this would also help keep the swarm healthy with active webseeds, though depending on how many torrents the client is caching in your application, this may be infeasible. As a side note, depending on the content and how the MKV is encoded, you can also attempt to render this in a WEBM tag. I've had luck doing this in the past with some sources working due to WEBM being a subset of MKV, though features like subtitles had to be extracted separately, converted to WebVTT and then re-added to the content, preventing the need for the full file to be downloaded before playback starts. If you want to have a further chat regarding this, feel free to continue the conversation here, or alternatively you can reach out to me via the email on my GitHub profile. Many thanks, |
@SilentBot1 9/10 times ? I have no idea what you're trying to say here. indeed, webm is a subset of matroska, it would have the same exact issue as I described above, additionally an external subtitle file would also have the exact same issue as I described above since 9/10 times it would be ordered after the video file. webm is vastly inferior to matroska which every1 knows, and which is why you won't find many torrents using that format. Converting pretty much any subtitle format to VTT is lossy, and doesn't work at all [yes I've tried]. Having an external subtitle file wouldn't solve the issue I described either, the video metadata would still be at the end of the file which is how the format was specced, |
Without keep state of the downloaded pieces (the bitfield) then it's very hard to do anything without verifying, although we could prioritize verifying, why not allow this state to be persisted and read? |
mainly external modification I guess? someone could modify or delete the file, so it needs to be re-scanned every time it's re-added as a torrent |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
noooo, not stale |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
bump |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
tes |
|
` this.store.get(piece.index, { offset: 0, length: piece.length }, (err, buffer) => {
} ` |
not quite, this doesn't work with torrent.select, which can happen in the middle of the store validation, also this won't work with the select changes planned for v2 |
What are the select changes for v2? Can I read about them somewhere? |
I am seeing #2260 |
Thanks @ThaUnknown. The |
What version of this package are you using?
v0.118.0
What problem do you want to solve?
Whenever adding a torrent with an existing store, its pieces need to be re-validated, this happens sequentially, meaning you need to wait for validation if you want to use a specific piece. This becomes an issue for formats like matroska where the video's metadata is at the very end of the file.
What do you think is the correct solution to this problem?
Create a priority for torrent pieces to be validated based on incoming request such as
file.createReadStream()
, this could potentially allow for users to read files before waiting for a potentially massive file to finish validation and maybe even start downloading missing pieces before validation is finished? This might not be possible tho.Are you willing to submit a pull request to implement this change?
No, no idea how to solve this issue.
The text was updated successfully, but these errors were encountered: