diff --git a/bazarr/app/config.py b/bazarr/app/config.py index 37da0f744..476640db8 100644 --- a/bazarr/app/config.py +++ b/bazarr/app/config.py @@ -82,7 +82,8 @@ defaults = { 'embedded_subtitles_parser': 'ffprobe', 'default_und_audio_lang': '', 'default_und_embedded_subtitles_lang': '', - 'parse_embedded_audio_track': 'False' + 'parse_embedded_audio_track': 'False', + 'skip_hashing': 'False' }, 'auth': { 'type': 'None', diff --git a/bazarr/subtitles/utils.py b/bazarr/subtitles/utils.py index dbeeaf3e3..4f0ee2cd2 100644 --- a/bazarr/subtitles/utils.py +++ b/bazarr/subtitles/utils.py @@ -7,6 +7,7 @@ import os from subzero.language import Language from subzero.video import parse_video +from app.config import settings from languages.custom_lang import CustomLanguage from app.database import get_profiles_list from subtitles.tools.score import movie_score, series_score @@ -36,7 +37,8 @@ def get_video(path, title, sceneName, providers=None, media_type="movie"): hash_from = original_path try: - video = parse_video(path, hints=hints, providers=providers, dry_run=used_scene_name, + skip_hashing = settings.general.getboolean('skip_hashing') + video = parse_video(path, hints=hints, skip_hashing=skip_hashing, dry_run=used_scene_name, providers=providers, hash_from=hash_from) video.used_scene_name = used_scene_name video.original_name = original_name diff --git a/frontend/src/pages/Settings/Subtitles/index.tsx b/frontend/src/pages/Settings/Subtitles/index.tsx index 80fc03695..ffd3e2774 100644 --- a/frontend/src/pages/Settings/Subtitles/index.tsx +++ b/frontend/src/pages/Settings/Subtitles/index.tsx @@ -288,6 +288,15 @@ const SettingsSubtitlesView: FunctionComponent = () => { > Embedded subtitles video parser + + + Skip video file hashing during search process to prevent sleeping hard + disk drive from waking-up. On the other hand, this may decrease your + search results scores. +