|
|
|
@ -36,7 +36,7 @@ class Badges(Resource):
|
|
|
|
|
def get(self):
|
|
|
|
|
"""Get badges count to update the UI"""
|
|
|
|
|
episodes_conditions = [(TableEpisodes.missing_subtitles.is_not(None)),
|
|
|
|
|
(TableEpisodes.missing_subtitles.is_not('[]'))]
|
|
|
|
|
(TableEpisodes.missing_subtitles != '[]')]
|
|
|
|
|
episodes_conditions += get_exclusion_clause('series')
|
|
|
|
|
missing_episodes = database.execute(
|
|
|
|
|
select(TableEpisodes.missing_subtitles)
|
|
|
|
@ -49,7 +49,7 @@ class Badges(Resource):
|
|
|
|
|
missing_episodes_count += len(ast.literal_eval(episode.missing_subtitles))
|
|
|
|
|
|
|
|
|
|
movies_conditions = [(TableMovies.missing_subtitles.is_not(None)),
|
|
|
|
|
(TableMovies.missing_subtitles.is_not('[]'))]
|
|
|
|
|
(TableMovies.missing_subtitles != '[]')]
|
|
|
|
|
movies_conditions += get_exclusion_clause('movie')
|
|
|
|
|
missing_movies = database.execute(
|
|
|
|
|
select(TableMovies.missing_subtitles)
|
|
|
|
|