Added a settings to ignore ffprobe cache on scheduled disk scan.

This commit is contained in:
morpheus65535 2021-08-17 14:35:01 -04:00
parent a2816f3761
commit 2762fc4a6a
3 changed files with 33 additions and 4 deletions

View File

@ -91,7 +91,8 @@ defaults = {
'series_sync': '60',
'episodes_sync': '60',
'excluded_tags': '[]',
'excluded_series_types': '[]'
'excluded_series_types': '[]',
'use_ffprobe_cache': 'True'
},
'radarr': {
'ip': '127.0.0.1',
@ -104,7 +105,8 @@ defaults = {
'full_update_hour': '5',
'only_monitored': 'False',
'movies_sync': '60',
'excluded_tags': '[]'
'excluded_tags': '[]',
'use_ffprobe_cache': 'True'
},
'proxy': {
'type': 'None',

View File

@ -446,6 +446,8 @@ def list_missing_subtitles_movies(no=None, send_event=True):
def series_full_scan_subtitles():
use_ffprobe_cache = settings.sonarr.getboolean('use_ffprobe_cache')
episodes = TableEpisodes.select(TableEpisodes.path).dicts()
count_episodes = len(episodes)
@ -456,7 +458,7 @@ def series_full_scan_subtitles():
name='Episodes subtitles',
value=i,
count=count_episodes)
store_subtitles(episode['path'], path_mappings.path_replace(episode['path']))
store_subtitles(episode['path'], path_mappings.path_replace(episode['path']), use_cache=use_ffprobe_cache)
hide_progress(id='episodes_disk_scan')
@ -464,6 +466,8 @@ def series_full_scan_subtitles():
def movies_full_scan_subtitles():
use_ffprobe_cache = settings.radarr.getboolean('use_ffprobe_cache')
movies = TableMovies.select(TableMovies.path).dicts()
count_movies = len(movies)
@ -474,7 +478,8 @@ def movies_full_scan_subtitles():
name='Movies subtitles',
value=i,
count=count_movies)
store_subtitles_movie(movie['path'], path_mappings.path_replace_movie(movie['path']))
store_subtitles_movie(movie['path'], path_mappings.path_replace_movie(movie['path']),
use_cache=use_ffprobe_cache)
hide_progress(id='movies_disk_scan')

View File

@ -1,8 +1,10 @@
import React, { FunctionComponent, useMemo } from "react";
import {
Check,
CollapseBox,
Group,
Input,
Message,
Selector,
SettingsProvider,
} from "../components";
@ -73,6 +75,16 @@ const SettingsSchedulerView: FunctionComponent = () => {
></Selector>
</Input>
</CollapseBox.Content>
<Input>
<Check
label="Use cached ffprobe results"
settingKey="settings-sonarr-use_ffprobe_cache"
></Check>
<Message>
If disabled, Bazarr will use ffprobe to index video file
properties on each run. This will result in higher disk I/O.
</Message>
</Input>
</CollapseBox>
<CollapseBox>
<CollapseBox.Control>
@ -99,6 +111,16 @@ const SettingsSchedulerView: FunctionComponent = () => {
></Selector>
</Input>
</CollapseBox.Content>
<Input>
<Check
label="Use cached ffprobe results"
settingKey="settings-radarr-use_ffprobe_cache"
></Check>
<Message>
If disabled, Bazarr will use ffprobe to index video file
properties on each run. This will result in higher disk I/O.
</Message>
</Input>
</CollapseBox>
</Group>
<Group header="Search and Upgrade Subtitles">