Prevent overwriting season and episode number guessed from file name with db values unless they haven't been properly guessed. #2284

This commit is contained in:
morpheus65535 2023-11-07 06:27:53 -05:00
parent 452f8c12c9
commit b87aef8763
1 changed files with 4 additions and 2 deletions

View File

@ -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