opensubtitles_hash 2.0.0 opensubtitles_hash: ^2.0.0 copied to clipboard
Dart 2 hashing library for OpenSubtitles. This is used to calculate OpenSubtitles' hash for video files in order to search for subtitles for that file in OpenSubtitles' database.
To hash a local file:
// File is the sample AVI file from the HashSourceCodes page
// on OpenSubtitle's Wiki.
String hash = await OpenSubtitlesHasher.computeFileHash(
new File('breakdance.avi')
);
To hash a remote file (HTTP):
String hash = await OpenSubtitlesHasher.computeURLHash(
"http://www.opensubtitles.org/addons/avi/breakdance.avi",
headers: { "X-My-Header": "true" }, // (Optional)
followRedirects: false // (Optional)
);