Utils¶
-
subliminal.utils.hash_opensubtitles(video_path)[source]¶ Compute a hash using OpenSubtitles’ algorithm.
-
subliminal.utils.hash_napiprojekt(video_path)[source]¶ Compute a hash using NapiProjekt’s algorithm.
-
subliminal.utils.hash_shooter(video_path)[source]¶ Compute a hash using Shooter’s algorithm
- Parameters
video_path (string) – path of the video
- Returns
the hash
- Return type
string
-
subliminal.utils.sanitize(string, ignore_characters=None)[source]¶ Sanitize a string to strip special characters.
-
subliminal.utils.sanitize_release_group(string)[source]¶ Sanitize a release_group string to remove content in square brackets.
-
subliminal.utils.timestamp(date)[source]¶ Get the timestamp of the date, python2/3 compatible
- Parameters
date (datetime.datetime) – the utc date.
- Returns
the timestamp of the date.
- Return type