From b87aef8763d94f384a8142394ee6534b08a5e4b4 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Tue, 7 Nov 2023 06:27:53 -0500 Subject: [PATCH] Prevent overwriting season and episode number guessed from file name with db values unless they haven't been properly guessed. #2284 --- bazarr/subtitles/refiners/database.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bazarr/subtitles/refiners/database.py b/bazarr/subtitles/refiners/database.py index 218e22c69..aa18cdfa1 100644 --- a/bazarr/subtitles/refiners/database.py +++ b/bazarr/subtitles/refiners/database.py @@ -38,8 +38,10 @@ def refine_from_db(path, video): if data: video.series = _TITLE_RE.sub('', data.seriesTitle) - video.season = int(data.season) - video.episode = int(data.episode) + if not video.season and data.season: + video.season = int(data.season) + if not video.episode and data.episode: + video.episode = int(data.episode) video.title = data.episodeTitle # Only refine year as a fallback