mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-10 08:47:52 +08:00
WIP
This commit is contained in:
parent
3df86acb85
commit
fb4b152c5b
1 changed files with 6 additions and 6 deletions
|
@ -225,9 +225,9 @@ def store_subtitles_movie(file):
|
|||
|
||||
|
||||
def list_missing_subtitles(no=None):
|
||||
episodes_subtitles_clause = "TableShows.sonarr_series_id.is_null(False)"
|
||||
episodes_subtitles_clause = [(TableShows.sonarr_series_id.is_null(False))]
|
||||
if no is not None:
|
||||
episodes_subtitles_clause = "TableShows.sonarr_series_id ** no"
|
||||
episodes_subtitles_clause.append((TableShows.sonarr_series_id ** no))
|
||||
|
||||
episodes_subtitles = TableEpisodes.select(
|
||||
TableEpisodes.sonarr_episode_id,
|
||||
|
@ -237,7 +237,7 @@ def list_missing_subtitles(no=None):
|
|||
).join_from(
|
||||
TableEpisodes, TableShows, JOIN.LEFT_OUTER
|
||||
).where(
|
||||
episodes_subtitles_clause
|
||||
reduce(operator.and_, episodes_subtitles_clause)
|
||||
).objects()
|
||||
|
||||
missing_subtitles_global = []
|
||||
|
@ -291,9 +291,9 @@ def list_missing_subtitles(no=None):
|
|||
|
||||
|
||||
def list_missing_subtitles_movies(no=None):
|
||||
movies_subtitles_clause = "TableMovies.radarr_id.is_null(False)"
|
||||
movies_subtitles_clause = [(TableMovies.radarr_id.is_null(False))]
|
||||
if no is not None:
|
||||
movies_subtitles_clause = "TableMovies.radarr_id ** no"
|
||||
movies_subtitles_clause.append((TableMovies.radarr_id == no))
|
||||
|
||||
movies_subtitles = TableMovies.select(
|
||||
TableMovies.radarr_id,
|
||||
|
@ -301,7 +301,7 @@ def list_missing_subtitles_movies(no=None):
|
|||
TableMovies.languages,
|
||||
TableMovies.forced
|
||||
).where(
|
||||
movies_subtitles_clause
|
||||
reduce(operator.and_, movies_subtitles_clause)
|
||||
)
|
||||
|
||||
missing_subtitles_global = []
|
||||
|
|
Loading…
Reference in a new issue