Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/bazarr/commit/f442d7d09190439d92a8ef40cc039492d787bb39
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
7 additions and
21 deletions
@ -318,7 +318,10 @@ class Badges(Resource):
episodes_conditions = [ ( TableEpisodes . missing_subtitles is not None ) ,
( TableEpisodes . missing_subtitles != ' [] ' ) ]
episodes_conditions + = get_exclusion_clause ( ' series ' )
missing_episodes = TableEpisodes . select ( ) . where ( reduce ( operator . and_ , episodes_conditions ) ) . count ( )
missing_episodes = TableEpisodes . select ( TableShows . tags , TableShows . seriesType ) \
. join ( TableShows , on = ( TableEpisodes . sonarrSeriesId == TableShows . sonarrSeriesId ) ) \
. where ( reduce ( operator . and_ , episodes_conditions ) ) \
. count ( )
movies_conditions = [ ( TableMovies . missing_subtitles is not None ) ,
( TableMovies . missing_subtitles != ' [] ' ) ]
@ -636,14 +639,11 @@ class Series(Resource):
item . update ( { " episodeMissingCount " : episodeMissingCount } )
# Add episode count
episodes_count_conditions = [ ( TableEpisodes . sonarrSeriesId == item [ ' sonarrSeriesId ' ] ) ]
episodes_count_conditions + = get_exclusion_clause ( ' series ' )
episodeFileCount = TableEpisodes . select ( TableShows . tags ,
TableEpisodes . monitored ,
TableShows . seriesType ) \
. join ( TableShows , on = ( TableEpisodes . sonarrSeriesId == TableShows . sonarrSeriesId ) ) \
. where ( reduce( operator . and_ , episodes_count_conditions ) ) \
. where ( TableEpisodes. sonarrSeriesId == item [ ' sonarrSeriesId ' ] ) \
. count ( )
item . update ( { " episodeFileCount " : episodeFileCount } )
@ -294,11 +294,11 @@ def get_exclusion_clause(exclusion_type):
if exclusion_type == ' series ' :
tagsList = ast . literal_eval ( settings . sonarr . excluded_tags )
for tag in tagsList :
where_clause . append ( ~ ( TableShows . tags * * tag ) )
where_clause . append ( ~ ( TableShows . tags . contains ( " \' " + tag + " \' " ) ) )
else :
tagsList = ast . literal_eval ( settings . radarr . excluded_tags )
for tag in tagsList :
where_clause . append ( ~ ( TableMovies . tags * * tag ) )
where_clause . append ( ~ ( TableMovies . tags . contains ( " \' " + tag + " \' " ) ) )
if exclusion_type == ' series ' :
monitoredOnly = settings . sonarr . getboolean ( ' only_monitored ' )
@ -161,20 +161,6 @@ def update_movies(send_event=True):
logging . debug ( ' BAZARR All movies synced from Radarr into database. ' )
# Search for desired subtitles if no more than 5 movies have been added.
if len ( altered_movies ) < = 5 :
logging . debug ( " BAZARR No more than 5 movies were added during this sync then we ' ll search for subtitles. " )
for altered_movie in altered_movies :
conditions = [ ( TableMovies . radarrId == altered_movie [ 2 ] ) ]
conditions + = get_exclusion_clause ( ' movie ' )
data = TableMovies . get ( reduce ( operator . and_ , conditions ) )
if data :
movies_download_subtitles ( data [ ' radarrId ' ] )
else :
logging . debug ( " BAZARR skipping download for this movie as it is excluded. " )
else :
logging . debug ( " BAZARR More than 5 movies were added during this sync then we wont search for subtitles. " )
def update_one_movie ( movie_id , action ) :
logging . debug ( ' BAZARR syncing this specific movie from Radarr: {} ' . format ( movie_id ) )