@ -324,7 +324,7 @@ def series():
c . execute ( " SELECT table_shows.sonarrSeriesId, COUNT(table_episodes.missing_subtitles) FROM table_shows LEFT JOIN table_episodes ON table_shows.sonarrSeriesId=table_episodes.sonarrSeriesId WHERE table_shows.languages IS NOT ' None ' GROUP BY table_shows.sonarrSeriesId " )
total_subtitles_list = c . fetchall ( )
c . close ( )
output = template ( ' series ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , missing_subtitles_list = missing_subtitles_list , total_subtitles_list = total_subtitles_list , languages = languages , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , single_language = single_language , page_size = page_size )
output = template ( ' series ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , missing_subtitles_list = missing_subtitles_list , total_subtitles_list = total_subtitles_list , languages = languages , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , single_language = single_language , page_size = page_size , current_port = port )
return output
@route ( base_url + ' serieseditor ' )
@ -346,7 +346,7 @@ def serieseditor():
c . execute ( " SELECT code2, name FROM table_settings_languages WHERE enabled = 1 " )
languages = c . fetchall ( )
c . close ( )
output = template ( ' serieseditor ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , languages = languages , missing_count = missing_count , base_url = base_url , single_language = single_language )
output = template ( ' serieseditor ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , languages = languages , missing_count = missing_count , base_url = base_url , single_language = single_language , current_port = port )
return output
@ -471,7 +471,7 @@ def episodes(no):
for key , season in itertools . groupby ( episodes , operator . itemgetter ( 2 ) ) :
seasons_list . append ( list ( season ) )
return template ( ' episodes ' , __file__ = __file__ , bazarr_version = bazarr_version , no = no , details = series_details , languages = languages , seasons = seasons_list , url_sonarr_short = url_sonarr_short , base_url = base_url , tvdbid = tvdbid , number = number )
return template ( ' episodes ' , __file__ = __file__ , bazarr_version = bazarr_version , no = no , details = series_details , languages = languages , seasons = seasons_list , url_sonarr_short = url_sonarr_short , base_url = base_url , tvdbid = tvdbid , number = number , current_port = port )
@route ( base_url + ' movies ' )
@custom_auth_basic ( check_credentials )
@ -498,7 +498,7 @@ def movies():
c . execute ( " SELECT code2, name FROM table_settings_languages WHERE enabled = 1 " )
languages = c . fetchall ( )
c . close ( )
output = template ( ' movies ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , languages = languages , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , single_language = single_language , page_size = page_size )
output = template ( ' movies ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , languages = languages , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , single_language = single_language , page_size = page_size , current_port = port )
return output
@route ( base_url + ' movieseditor ' )
@ -520,7 +520,7 @@ def movieseditor():
c . execute ( " SELECT code2, name FROM table_settings_languages WHERE enabled = 1 " )
languages = c . fetchall ( )
c . close ( )
output = template ( ' movieseditor ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , languages = languages , missing_count = missing_count , base_url = base_url , single_language = single_language )
output = template ( ' movieseditor ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , languages = languages , missing_count = missing_count , base_url = base_url , single_language = single_language , current_port = port )
return output
@route ( base_url + ' edit_movieseditor ' , method = ' POST ' )
@ -605,7 +605,7 @@ def movie(no):
languages = c . execute ( " SELECT code2, name FROM table_settings_languages WHERE enabled = 1 " ) . fetchall ( )
c . close ( )
return template ( ' movie ' , __file__ = __file__ , bazarr_version = bazarr_version , no = no , details = movies_details , languages = languages , url_radarr_short = url_radarr_short , base_url = base_url , tmdbid = tmdbid )
return template ( ' movie ' , __file__ = __file__ , bazarr_version = bazarr_version , no = no , details = movies_details , languages = languages , url_radarr_short = url_radarr_short , base_url = base_url , tmdbid = tmdbid , current_port = port )
@route ( base_url + ' scan_disk/<no:int> ' , method = ' GET ' )
@custom_auth_basic ( check_credentials )
@ -651,7 +651,7 @@ def search_missing_subtitles_movie(no):
@custom_auth_basic ( check_credentials )
def history ( ) :
authorize ( )
return template ( ' history ' , __file__ = __file__ , bazarr_version = bazarr_version , base_url = base_url )
return template ( ' history ' , __file__ = __file__ , bazarr_version = bazarr_version , base_url = base_url , current_port = port )
@route ( base_url + ' historyseries ' )
@custom_auth_basic ( check_credentials )
@ -689,7 +689,7 @@ def historyseries():
data = c . fetchall ( )
c . close ( )
data = reversed ( sorted ( data , key = operator . itemgetter ( 4 ) ) )
return template ( ' historyseries ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , row_count = row_count , page = page , max_page = max_page , stats = stats , base_url = base_url , page_size = page_size )
return template ( ' historyseries ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , row_count = row_count , page = page , max_page = max_page , stats = stats , base_url = base_url , page_size = page_size , current_port = port )
@route ( base_url + ' historymovies ' )
@custom_auth_basic ( check_credentials )
@ -727,13 +727,13 @@ def historymovies():
data = c . fetchall ( )
c . close ( )
data = reversed ( sorted ( data , key = operator . itemgetter ( 2 ) ) )
return template ( ' historymovies ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , row_count = row_count , page = page , max_page = max_page , stats = stats , base_url = base_url , page_size = page_size )
return template ( ' historymovies ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , row_count = row_count , page = page , max_page = max_page , stats = stats , base_url = base_url , page_size = page_size , current_port = port )
@route ( base_url + ' wanted ' )
@custom_auth_basic ( check_credentials )
def wanted ( ) :
authorize ( )
return template ( ' wanted ' , __file__ = __file__ , bazarr_version = bazarr_version , base_url = base_url )
return template ( ' wanted ' , __file__ = __file__ , bazarr_version = bazarr_version , base_url = base_url , current_port = port )
@route ( base_url + ' wantedseries ' )
@custom_auth_basic ( check_credentials )
@ -761,7 +761,7 @@ def wantedseries():
c . execute ( " SELECT table_shows.title, table_episodes.season || ' x ' || table_episodes.episode, table_episodes.title, table_episodes.missing_subtitles, table_episodes.sonarrSeriesId, path_substitution(table_episodes.path), table_shows.hearing_impaired, table_episodes.sonarrEpisodeId, table_episodes.scene_name FROM table_episodes INNER JOIN table_shows on table_shows.sonarrSeriesId = table_episodes.sonarrSeriesId WHERE table_episodes.missing_subtitles != ' [] ' " + monitored_only_query_string + " ORDER BY table_episodes._rowid_ DESC LIMIT ? OFFSET ? " , ( page_size , offset , ) )
data = c . fetchall ( )
c . close ( )
return template ( ' wantedseries ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , page_size = page_size )
return template ( ' wantedseries ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , page_size = page_size , current_port = port )
@route ( base_url + ' wantedmovies ' )
@custom_auth_basic ( check_credentials )
@ -789,7 +789,7 @@ def wantedmovies():
c . execute ( " SELECT title, missing_subtitles, radarrId, path_substitution(path), hearing_impaired, sceneName FROM table_movies WHERE missing_subtitles != ' [] ' " + monitored_only_query_string + " ORDER BY _rowid_ DESC LIMIT ? OFFSET ? " , ( page_size , offset , ) )
data = c . fetchall ( )
c . close ( )
return template ( ' wantedmovies ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , page_size = page_size )
return template ( ' wantedmovies ' , __file__ = __file__ , bazarr_version = bazarr_version , rows = data , missing_count = missing_count , page = page , max_page = max_page , base_url = base_url , page_size = page_size , current_port = port )
@route ( base_url + ' wanted_search_missing_subtitles ' )
@custom_auth_basic ( check_credentials )
@ -822,7 +822,7 @@ def settings():
settings_sonarr = get_sonarr_settings ( )
settings_radarr = get_radarr_settings ( )
return template ( ' settings ' , __file__ = __file__ , bazarr_version = bazarr_version , settings_general = settings_general , settings_proxy = settings_proxy , settings_auth = settings_auth , settings_languages = settings_languages , settings_providers = settings_providers , settings_sonarr = settings_sonarr , settings_radarr = settings_radarr , settings_notifier = settings_notifier , base_url = base_url )
return template ( ' settings ' , __file__ = __file__ , bazarr_version = bazarr_version , settings_general = settings_general , settings_proxy = settings_proxy , settings_auth = settings_auth , settings_languages = settings_languages , settings_providers = settings_providers , settings_sonarr = settings_sonarr , settings_radarr = settings_radarr , settings_notifier = settings_notifier , base_url = base_url , current_port = port )
@route ( base_url + ' save_settings ' , method = ' POST ' )
@custom_auth_basic ( check_credentials )
@ -1435,7 +1435,7 @@ def system():
for release in r . json ( ) :
releases . append ( [ release [ ' name ' ] , release [ ' body ' ] ] )
return template ( ' system ' , __file__ = __file__ , bazarr_version = bazarr_version , base_url = base_url , task_list = task_list , row_count = row_count , max_page = max_page , page_size = page_size , releases = releases )
return template ( ' system ' , __file__ = __file__ , bazarr_version = bazarr_version , base_url = base_url , task_list = task_list , row_count = row_count , max_page = max_page , page_size = page_size , releases = releases , current_port = port )
@route ( base_url + ' logs/<page:int> ' )
@custom_auth_basic ( check_credentials )
@ -1449,7 +1449,7 @@ def get_logs(page):
logs_complete . append ( line . rstrip ( ) )
logs = logs_complete [ begin : end ]
return template ( ' logs ' , logs = logs , base_url = base_url )
return template ( ' logs ' , logs = logs , base_url = base_url , current_port = port )
@route ( base_url + ' execute/<taskid> ' )
@custom_auth_basic ( check_credentials )