mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 09:37:25 +00:00
Fix for year not matching for series and movies that includes year in directory name.
This commit is contained in:
parent
7a2e6ab24f
commit
49e7dfa0f5
1 changed files with 2 additions and 2 deletions
|
@ -1033,7 +1033,7 @@ def refine_from_db(path, video):
|
|||
"WHERE table_episodes.path = ?", (path_mappings.path_replace_reverse(path),), only_one=True)
|
||||
|
||||
if data:
|
||||
video.series = re.sub(r'(\(\d\d\d\d\))', '', data['seriesTitle'])
|
||||
video.series = re.sub(r'\s(\(\d\d\d\d\))', '', data['seriesTitle'])
|
||||
video.season = int(data['season'])
|
||||
video.episode = int(data['episode'])
|
||||
video.title = data['episodeTitle']
|
||||
|
@ -1056,7 +1056,7 @@ def refine_from_db(path, video):
|
|||
(path_mappings.path_replace_reverse_movie(path),), only_one=True)
|
||||
|
||||
if data:
|
||||
video.title = re.sub(r'(\(\d\d\d\d\))', '', data['title'])
|
||||
video.title = re.sub(r'\s(\(\d\d\d\d\))', '', data['title'])
|
||||
# Commented out because Radarr provided so much bad year
|
||||
# if data['year']:
|
||||
# if int(data['year']) > 0: video.year = int(data['year'])
|
||||
|
|
Loading…
Reference in a new issue