Fixed history views when upgrade subtitles is disabled. #2210

This commit is contained in:
morpheus65535 2023-08-04 10:18:48 -04:00
parent 4bb6ec7528
commit 6000a8889d
1 changed files with 8 additions and 2 deletions

View File

@ -239,7 +239,10 @@ def parse_language_string(language_string):
def get_upgradable_episode_subtitles():
if not settings.general.getboolean('upgrade_subs'):
return []
# return an empty set of rows
return select(TableHistory.id) \
.where(TableHistory.id.is_(None)) \
.subquery()
max_id_timestamp = select(TableHistory.video_path,
TableHistory.language,
@ -269,7 +272,10 @@ def get_upgradable_episode_subtitles():
def get_upgradable_movies_subtitles():
if not settings.general.getboolean('upgrade_subs'):
return []
# return an empty set of rows
return select(TableHistoryMovie.id) \
.where(TableHistoryMovie.id.is_(None)) \
.subquery()
max_id_timestamp = select(TableHistoryMovie.video_path,
TableHistoryMovie.language,