Skip to content

Commit

Permalink
Prevent overwriting season and episode number guessed from file name …
Browse files Browse the repository at this point in the history
…with db values unless they haven't been properly guessed. #2284
  • Loading branch information
morpheus65535 committed Nov 7, 2023
1 parent 452f8c1 commit b87aef8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bazarr/subtitles/refiners/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b87aef8

Please sign in to comment.