summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2023-11-07 06:27:53 -0500
committermorpheus65535 <[email protected]>2023-11-07 06:27:53 -0500
commitb87aef8763d94f384a8142394ee6534b08a5e4b4 (patch)
treed1432ad167a7d03c683da1be803411f09379f627
parent452f8c12c9cbacd98eabc1f04750a0282903847f (diff)
downloadbazarr-1.3.2-beta.10.tar.gz
bazarr-1.3.2-beta.10.zip
Prevent overwriting season and episode number guessed from file name with db values unless they haven't been properly guessed. #2284v1.3.2-beta.10
-rw-r--r--bazarr/subtitles/refiners/database.py6
1 files 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