rapidbay
rapidbay copied to clipboard
[WIP] Start downloading subtitles before download finishes
To speed up the process, the goal of this PR is to start the download of subtitles from OpenSubtitles before the torrent file download finishes.
To accomplish this we need to prioritize the front and back of the file so that the opensubtitle hash function can be called on the file. We need 64bits from the beginning and end of the file.
For reference: https://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes
This also helps pave the way for instant streaming in future releases, making it possible to start streaming a file before the torrent download finishes.