mirror of https://github.com/morpheus65535/bazarr
Merge branch 'development' into notifications
# Conflicts: # bazarr/get_movies.py # bazarr/list_subtitles.py # bazarr/main.py
This commit is contained in:
commit
536f0196c0
|
@ -119,8 +119,9 @@ def update_movies():
|
|||
for added_movie in movies_to_add:
|
||||
store_subtitles_movie(path_replace_movie(added_movie[1]))
|
||||
|
||||
#for updated_movie in movies_to_update:
|
||||
# store_subtitles_movie(path_replace_movie(updated_movie[1]))
|
||||
# TODO: Commented until I find a way to make it store only episodes really updated.
|
||||
# for updated_movie in movies_to_update:
|
||||
# store_subtitles_movie(path_replace_movie(updated_movie[1]))
|
||||
|
||||
logging.debug('BAZARR All movies synced from Radarr into database.')
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import os
|
||||
import sqlite3
|
||||
import logging
|
||||
import time
|
||||
|
||||
from cork import Cork
|
||||
from configparser import ConfigParser
|
||||
from get_argv import config_dir
|
||||
|
||||
|
@ -79,8 +81,6 @@ if cfg.has_section('general'):
|
|||
with open(config_file, 'w+') as configfile:
|
||||
cfg.write(configfile)
|
||||
|
||||
from cork import Cork
|
||||
import time
|
||||
if os.path.exists(os.path.normpath(os.path.join(config_dir, 'config/users.json'))) is False:
|
||||
cork = Cork(os.path.normpath(os.path.join(config_dir, 'config')), initialize=True)
|
||||
|
||||
|
|
|
@ -20,11 +20,12 @@ from queueconfig import q4ws
|
|||
gc.enable()
|
||||
|
||||
def store_subtitles(file):
|
||||
# languages = []
|
||||
logging.debug('BAZARR started subtitles indexing for this file: ' + file)
|
||||
actual_subtitles = []
|
||||
if os.path.exists(file):
|
||||
q4ws.append('Analyzing this file for subtitles: ' + file)
|
||||
if os.path.splitext(file)[1] == '.mkv':
|
||||
logging.debug("BAZARR is trying to index embedded subtitles.")
|
||||
try:
|
||||
with open(file, 'rb') as f:
|
||||
mkv = enzyme.MKV(f)
|
||||
|
@ -32,57 +33,72 @@ def store_subtitles(file):
|
|||
for subtitle_track in mkv.subtitle_tracks:
|
||||
try:
|
||||
if alpha2_from_alpha3(subtitle_track.language) != None:
|
||||
actual_subtitles.append([str(alpha2_from_alpha3(subtitle_track.language)),None])
|
||||
lang = str(alpha2_from_alpha3(subtitle_track.language))
|
||||
logging.debug("BAZARR embedded subtitles detected: " + lang)
|
||||
actual_subtitles.append([lang,None])
|
||||
except:
|
||||
logging.debug("BAZARR unable to index this unrecognized language: " + subtitle_track.language)
|
||||
pass
|
||||
except:
|
||||
except Exception as e:
|
||||
logging.exception("BAZARR error when trying to analyze this mkv file: " + file)
|
||||
pass
|
||||
else:
|
||||
logging.debug("BAZARR This file isn't an .mkv file.")
|
||||
|
||||
|
||||
brazilian_portuguese = [".pt-br", ".pob", "pb"]
|
||||
try:
|
||||
subtitles = core.search_external_subtitles(file)
|
||||
except:
|
||||
except Exception as e:
|
||||
logging.exception("BAZARR unable to index external subtitles.")
|
||||
pass
|
||||
else:
|
||||
for subtitle, language in subtitles.iteritems():
|
||||
if str(os.path.splitext(subtitle)[0]).lower().endswith(tuple(brazilian_portuguese)) is True:
|
||||
logging.debug("BAZARR external subtitles detected: " + "pb")
|
||||
actual_subtitles.append([str("pb"), path_replace_reverse(os.path.join(os.path.dirname(file), subtitle))])
|
||||
elif str(language) != 'und':
|
||||
logging.debug("BAZARR external subtitles detected: " + str(language))
|
||||
actual_subtitles.append([str(language), path_replace_reverse(os.path.join(os.path.dirname(file), subtitle))])
|
||||
else:
|
||||
with open(path_replace(os.path.join(os.path.dirname(file), subtitle)), 'r') as f:
|
||||
text = list(islice(f, 100))
|
||||
text = ' '.join(text)
|
||||
encoding = UnicodeDammit(text)
|
||||
try:
|
||||
text = text.decode(encoding.original_encoding)
|
||||
detected_language = langdetect.detect(text)
|
||||
except Exception as e:
|
||||
logging.exception('BAZARR Error trying to detect character encoding for this subtitles file: ' + path_replace(os.path.join(os.path.dirname(file), subtitle)) + ' You should try to delete this subtitles file manually and ask Bazarr to download it again.')
|
||||
else:
|
||||
if len(detected_language) > 0:
|
||||
actual_subtitles.append([str(detected_language), path_replace_reverse(os.path.join(os.path.dirname(file), subtitle))])
|
||||
if os.path.splitext(subtitle)[1] != ".sub":
|
||||
logging.debug("BAZARR falling back to file content analysis to detect language.")
|
||||
with open(path_replace(os.path.join(os.path.dirname(file), subtitle)), 'r') as f:
|
||||
text = list(islice(f, 100))
|
||||
text = ' '.join(text)
|
||||
encoding = UnicodeDammit(text)
|
||||
try:
|
||||
text = text.decode(encoding.original_encoding)
|
||||
detected_language = langdetect.detect(text)
|
||||
except Exception as e:
|
||||
logging.exception('BAZARR Error trying to detect language for this subtitles file: ' + path_replace(os.path.join(os.path.dirname(file), subtitle)) + ' You should try to delete this subtitles file manually and ask Bazarr to download it again.')
|
||||
else:
|
||||
if len(detected_language) > 0:
|
||||
logging.debug("BAZARR external subtitles detected and analysis guessed this language: " + str(detected_language))
|
||||
actual_subtitles.append([str(detected_language), path_replace_reverse(os.path.join(os.path.dirname(file), subtitle))])
|
||||
|
||||
conn_db = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
||||
c_db = conn_db.cursor()
|
||||
conn_db = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
||||
c_db = conn_db.cursor()
|
||||
logging.debug("BAZARR storing those languages to DB: " + str(actual_subtitles))
|
||||
c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles), path_replace_reverse(file)))
|
||||
conn_db.commit()
|
||||
|
||||
c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles), path_replace_reverse(file)))
|
||||
conn_db.commit()
|
||||
|
||||
c_db.close()
|
||||
c_db.close()
|
||||
else:
|
||||
logging.error('BAZARR This file does not exist or is not accessible by Bazarr (check your path mapping?): ' + file)
|
||||
logging.debug("BAZARR this file doesn't seems to exist or isn't accessible.")
|
||||
|
||||
logging.debug('BAZARR ended subtitles indexing for this file: ' + file)
|
||||
|
||||
return actual_subtitles
|
||||
|
||||
|
||||
def store_subtitles_movie(file):
|
||||
# languages = []
|
||||
logging.debug('BAZARR started subtitles indexing for this file: ' + file)
|
||||
actual_subtitles = []
|
||||
if os.path.exists(file):
|
||||
q4ws.append('Analyzing this file for subtitles: ' + file)
|
||||
if os.path.splitext(file)[1] == '.mkv':
|
||||
logging.debug("BAZARR is trying to index embedded subtitles.")
|
||||
try:
|
||||
with open(file, 'rb') as f:
|
||||
mkv = enzyme.MKV(f)
|
||||
|
@ -90,44 +106,61 @@ def store_subtitles_movie(file):
|
|||
for subtitle_track in mkv.subtitle_tracks:
|
||||
try:
|
||||
if alpha2_from_alpha3(subtitle_track.language) != None:
|
||||
actual_subtitles.append([str(alpha2_from_alpha3(subtitle_track.language)), None])
|
||||
lang = str(alpha2_from_alpha3(subtitle_track.language))
|
||||
logging.debug("BAZARR embedded subtitles detected: " + lang)
|
||||
actual_subtitles.append([lang, None])
|
||||
except:
|
||||
logging.debug("BAZARR unable to index this unrecognized language: " + subtitle_track.language)
|
||||
pass
|
||||
except:
|
||||
except Exception as e:
|
||||
logging.exception("BAZARR error when trying to analyze this mkv file: " + file)
|
||||
pass
|
||||
else:
|
||||
logging.debug("BAZARR This file isn't an .mkv file.")
|
||||
|
||||
|
||||
subtitles = core.search_external_subtitles(file)
|
||||
brazilian_portuguese = [".pt-br", ".pob", "pb"]
|
||||
|
||||
for subtitle, language in subtitles.iteritems():
|
||||
if str(os.path.splitext(subtitle)[0]).lower().endswith(tuple(brazilian_portuguese)) is True:
|
||||
actual_subtitles.append([str("pb"), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
||||
elif str(language) != 'und':
|
||||
actual_subtitles.append([str(language), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
||||
else:
|
||||
if os.path.splitext(subtitle)[1] != ".sub":
|
||||
with open(path_replace_movie(os.path.join(os.path.dirname(file), subtitle)), 'r') as f:
|
||||
text = list(islice(f, 100))
|
||||
text = ' '.join(text)
|
||||
encoding = UnicodeDammit(text)
|
||||
try:
|
||||
text = text.decode(encoding.original_encoding)
|
||||
detected_language = langdetect.detect(text)
|
||||
except Exception as e:
|
||||
logging.exception('BAZARR Error trying to detect character encoding for this subtitles file: ' + path_replace_movie(os.path.join(os.path.dirname(file), subtitle)) + ' You should try to delete this subtitles file manually and ask Bazarr to download it again.')
|
||||
else:
|
||||
if len(detected_language) > 0:
|
||||
actual_subtitles.append([str(detected_language), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
||||
try:
|
||||
subtitles = core.search_external_subtitles(file)
|
||||
except Exception as e:
|
||||
logging.exception("BAZARR unable to index external subtitles.")
|
||||
pass
|
||||
else:
|
||||
for subtitle, language in subtitles.iteritems():
|
||||
if str(os.path.splitext(subtitle)[0]).lower().endswith(tuple(brazilian_portuguese)) is True:
|
||||
logging.debug("BAZARR external subtitles detected: " + "pb")
|
||||
actual_subtitles.append([str("pb"), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
||||
elif str(language) != 'und':
|
||||
logging.debug("BAZARR external subtitles detected: " + str(language))
|
||||
actual_subtitles.append([str(language), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
||||
else:
|
||||
if os.path.splitext(subtitle)[1] != ".sub":
|
||||
logging.debug("BAZARR falling back to file content analysis to detect language.")
|
||||
with open(path_replace_movie(os.path.join(os.path.dirname(file), subtitle)), 'r') as f:
|
||||
text = list(islice(f, 100))
|
||||
text = ' '.join(text)
|
||||
encoding = UnicodeDammit(text)
|
||||
try:
|
||||
text = text.decode(encoding.original_encoding)
|
||||
detected_language = langdetect.detect(text)
|
||||
except Exception as e:
|
||||
logging.exception('BAZARR Error trying to detect language for this subtitles file: ' + path_replace(os.path.join(os.path.dirname(file), subtitle)) + ' You should try to delete this subtitles file manually and ask Bazarr to download it again.')
|
||||
else:
|
||||
if len(detected_language) > 0:
|
||||
logging.debug("BAZARR external subtitles detected and analysis guessed this language: " + str(detected_language))
|
||||
actual_subtitles.append([str(detected_language), path_replace_reverse_movie(os.path.join(os.path.dirname(file), subtitle))])
|
||||
|
||||
conn_db = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
||||
c_db = conn_db.cursor()
|
||||
|
||||
logging.debug("BAZARR storing those languages to DB: " + str(actual_subtitles))
|
||||
c_db.execute("UPDATE table_movies SET subtitles = ? WHERE path = ?", (str(actual_subtitles), path_replace_reverse_movie(file)))
|
||||
conn_db.commit()
|
||||
|
||||
c_db.close()
|
||||
else:
|
||||
logging.error('BAZARR This file does not exist or is not accessible by Bazarr (check your path mapping?): ' + file)
|
||||
logging.debug("BAZARR this file doesn't seems to exist or isn't accessible.")
|
||||
|
||||
logging.debug('BAZARR ended subtitles indexing for this file: ' + file)
|
||||
|
||||
return actual_subtitles
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
bazarr_version = '0.6.9'
|
||||
bazarr_version = '0.6.9.1'
|
||||
|
||||
import gc
|
||||
gc.enable()
|
||||
|
@ -79,7 +79,9 @@ import ast
|
|||
import hashlib
|
||||
import time
|
||||
import urllib
|
||||
import platform
|
||||
from six import text_type
|
||||
import apprise
|
||||
|
||||
from get_languages import load_language_in_db, language_from_alpha3
|
||||
from get_providers import load_providers, get_providers, get_providers_auth
|
||||
|
@ -103,6 +105,11 @@ c.execute("UPDATE system SET configured = 0, updated = 0")
|
|||
conn.commit()
|
||||
c.close()
|
||||
|
||||
logging.debug('Bazarr version: %s', bazarr_version)
|
||||
logging.debug('Bazarr branch: %s', get_general_settings()[5])
|
||||
logging.debug('Operating system: %s', platform.platform())
|
||||
logging.debug('Python version: %s', platform.python_version())
|
||||
|
||||
# Load languages in database
|
||||
load_language_in_db()
|
||||
|
||||
|
@ -232,7 +239,7 @@ def wizard():
|
|||
settings_sonarr = get_sonarr_settings()
|
||||
settings_radarr = get_radarr_settings()
|
||||
|
||||
return template('wizard', __file__=__file__, bazarr_version=bazarr_version, settings_general=settings_general,
|
||||
return template('wizard', bazarr_version=bazarr_version, settings_general=settings_general,
|
||||
settings_languages=settings_languages, settings_providers=settings_providers,
|
||||
settings_sonarr=settings_sonarr, settings_radarr=settings_radarr, base_url=base_url)
|
||||
|
||||
|
@ -536,7 +543,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'" + monitored_only_query_string + " GROUP BY table_shows.sonarrSeriesId")
|
||||
total_subtitles_list = c.fetchall()
|
||||
c.close()
|
||||
output = template('series', __file__=__file__, bazarr_version=bazarr_version, rows=data,
|
||||
output = template('series', 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)
|
||||
|
@ -562,7 +569,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, current_port=port)
|
||||
output = template('serieseditor', 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
|
||||
|
||||
|
||||
|
@ -687,7 +694,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, current_port=port)
|
||||
return template('episodes', 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)
|
||||
|
@ -714,7 +721,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, current_port=port)
|
||||
output = template('movies', 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')
|
||||
|
@ -736,7 +743,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, current_port=port)
|
||||
output = template('movieseditor', 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')
|
||||
|
@ -821,7 +828,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, current_port=port)
|
||||
return template('movie', 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)
|
||||
|
@ -867,7 +874,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, current_port=port)
|
||||
return template('history', bazarr_version=bazarr_version, base_url=base_url, current_port=port)
|
||||
|
||||
@route(base_url + 'historyseries')
|
||||
@custom_auth_basic(check_credentials)
|
||||
|
@ -905,7 +912,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, current_port=port)
|
||||
return template('historyseries', 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)
|
||||
|
@ -943,13 +950,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, current_port=port)
|
||||
return template('historymovies', 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, current_port=port)
|
||||
return template('wanted', bazarr_version=bazarr_version, base_url=base_url, current_port=port)
|
||||
|
||||
@route(base_url + 'wantedseries')
|
||||
@custom_auth_basic(check_credentials)
|
||||
|
@ -977,7 +984,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, table_episodes.failedAttempts 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, current_port=port)
|
||||
return template('wantedseries', 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)
|
||||
|
@ -1005,7 +1012,7 @@ def wantedmovies():
|
|||
c.execute("SELECT title, missing_subtitles, radarrId, path_substitution(path), hearing_impaired, sceneName, failedAttempts 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, current_port=port)
|
||||
return template('wantedmovies', 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)
|
||||
|
@ -1038,7 +1045,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, current_port=port)
|
||||
return template('settings', 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)
|
||||
|
@ -1463,24 +1470,31 @@ def system():
|
|||
releases = ast.literal_eval(f.read())
|
||||
|
||||
import platform
|
||||
use_sonarr = get_general_settings()[12]
|
||||
url_sonarr = get_sonarr_settings()[6]
|
||||
apikey_sonarr = get_sonarr_settings()[4]
|
||||
sv = url_sonarr + "/api/system/status?apikey=" + apikey_sonarr
|
||||
try:
|
||||
sonarr_version = requests.get(sv, timeout=15, verify=False)
|
||||
except:
|
||||
sonarr_version = ''
|
||||
sonarr_version = ''
|
||||
if use_sonarr:
|
||||
try:
|
||||
sonarr_version = requests.get(sv, timeout=15, verify=False).json()['version']
|
||||
except:
|
||||
pass
|
||||
|
||||
use_radarr = get_general_settings()[13]
|
||||
url_radarr = get_radarr_settings()[6]
|
||||
apikey_radarr = get_radarr_settings()[4]
|
||||
sv = url_radarr + "/api/system/status?apikey=" + apikey_radarr
|
||||
try:
|
||||
radarr_version = requests.get(sv, timeout=15, verify=False)
|
||||
except:
|
||||
radarr_version = ''
|
||||
rv = url_radarr + "/api/system/status?apikey=" + apikey_radarr
|
||||
radarr_version = ''
|
||||
if use_radarr:
|
||||
try:
|
||||
radarr_version = requests.get(rv, timeout=15, verify=False).json()['version']
|
||||
except:
|
||||
pass
|
||||
|
||||
return template('system', __file__=__file__, bazarr_version=bazarr_version,
|
||||
sonarr_version=sonarr_version.json()['version'], radarr_version=radarr_version.json()['version'],
|
||||
|
||||
return template('system', bazarr_version=bazarr_version,
|
||||
sonarr_version=sonarr_version, radarr_version=radarr_version,
|
||||
operating_system=platform.platform(), python_version=platform.python_version(),
|
||||
config_dir=config_dir, bazarr_dir=os.path.normcase(os.getcwd()),
|
||||
base_url=base_url, task_list=task_list, row_count=row_count, max_page=max_page, page_size=page_size,
|
||||
|
@ -1747,6 +1761,20 @@ def test_url(protocol, url):
|
|||
else:
|
||||
return dict(status=True, version=result)
|
||||
|
||||
|
||||
@route(base_url + 'test_notification/<protocol>/<provider:path>', method='GET')
|
||||
@custom_auth_basic(check_credentials)
|
||||
def test_notification(protocol, provider):
|
||||
provider = urllib.unquote(provider)
|
||||
apobj = apprise.Apprise()
|
||||
apobj.add(protocol + "://" + provider)
|
||||
|
||||
apobj.notify(
|
||||
title='Bazarr test notification',
|
||||
body=('Test notification')
|
||||
)
|
||||
|
||||
|
||||
@route(base_url + 'websocket')
|
||||
@custom_auth_basic(check_credentials)
|
||||
def handle_websocket():
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -9,7 +9,6 @@
|
|||
<link rel="stylesheet" href="{{base_url}}static/semantic/semantic.css">
|
||||
<link rel="stylesheet" type="text/css" href="{{base_url}}static/datatables/datatables.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{base_url}}static/datatables/semanticui.min.css"/>
|
||||
|
||||
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{base_url}}static/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{base_url}}static/favicon-32x32.png">
|
||||
|
@ -37,14 +36,14 @@
|
|||
margin-bottom: 3em;
|
||||
padding: 2em;
|
||||
border-radius: 1px;
|
||||
box-shadow: 0px 0px 5px 5px #000000;
|
||||
box-shadow: 0 0 5px 5px #000000;
|
||||
min-height: calc(250px + 4em);
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
opacity: 0.9;
|
||||
border-radius: 1px;
|
||||
box-shadow: 0px 0px 3px 3px #ffffff;
|
||||
box-shadow: 0 0 3px 3px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding-top: 2em;
|
||||
|
@ -78,11 +77,11 @@
|
|||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(function(){
|
||||
$('.ui.accordion').accordion();
|
||||
var first_season_acc_title = document.getElementsByClassName("title")[0];
|
||||
const first_season_acc_title = document.getElementsByClassName("title")[0];
|
||||
first_season_acc_title.className += " active";
|
||||
var first_season_acc_content = document.getElementsByClassName("content")[0];
|
||||
const first_season_acc_content = document.getElementsByClassName("content")[0];
|
||||
first_season_acc_content.className += " active";
|
||||
});
|
||||
</script>
|
||||
|
@ -230,12 +229,12 @@
|
|||
%>
|
||||
<a data-episodePath="{{episode[1]}}" data-scenename="{{episode[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{details[4]}}" data-sonarrSeriesId="{{episode[5]}}" data-sonarrEpisodeId="{{episode[7]}}" class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
%else:
|
||||
<a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top right" data-inverted="" data-episodePath="{{episode[1]}}" data-scenename="{{episode[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{details[4]}}" data-sonarrSeriesId="{{episode[5]}}" data-sonarrEpisodeId="{{episode[7]}}" class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search red icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search red icon"></i>
|
||||
</a>
|
||||
%end
|
||||
%end
|
||||
|
@ -243,7 +242,7 @@
|
|||
%else:
|
||||
<a data-episodePath="{{episode[1]}}" data-scenename="{{episode[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{details[4]}}" data-sonarrSeriesId="{{episode[5]}}" data-sonarrEpisodeId="{{episode[7]}}" class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
%end
|
||||
%end
|
||||
|
@ -356,18 +355,18 @@
|
|||
</html>
|
||||
|
||||
<script>
|
||||
$('#scan_disk').click(function(){
|
||||
$('#scan_disk').on('click', function(){
|
||||
$('#loader_text').text("Scanning disk for existing subtitles...");
|
||||
window.location = '{{base_url}}scan_disk/{{no}}';
|
||||
})
|
||||
});
|
||||
|
||||
$('#search_missing_subtitles').click(function(){
|
||||
$('#search_missing_subtitles').on('click', function(){
|
||||
$('#loader_text').text("Searching for missing subtitles...");
|
||||
window.location = '{{base_url}}search_missing_subtitles/{{no}}';
|
||||
})
|
||||
});
|
||||
|
||||
$('.remove_subtitles').click(function(){
|
||||
var values = {
|
||||
$('.remove_subtitles').on('click', function(){
|
||||
const values = {
|
||||
episodePath: $(this).attr("data-episodePath"),
|
||||
language: $(this).attr("data-language"),
|
||||
subtitlesPath: $(this).attr("data-subtitlesPath"),
|
||||
|
@ -390,10 +389,10 @@
|
|||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
var values = {
|
||||
$('.get_subtitle').on('click', function(){
|
||||
const values = {
|
||||
episodePath: $(this).attr("data-episodePath"),
|
||||
sceneName: $(this).attr("data-sceneName"),
|
||||
language: $(this).attr("data-language"),
|
||||
|
@ -416,19 +415,18 @@
|
|||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('a:not(.manual_search), .menu .item, button:not(#config, .cancel)').click(function(){
|
||||
$('a:not(.manual_search), .menu .item, button:not(#config, .cancel)').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
});
|
||||
|
||||
$('#config').click(function(){
|
||||
$('#config').on('click', function(){
|
||||
$('#series_form').attr('action', '{{base_url}}edit_series/{{no}}');
|
||||
|
||||
$("#series_title").html($(this).data("title"));
|
||||
|
@ -437,10 +435,10 @@
|
|||
$("#series_audio_language").html($(this).data("audio"));
|
||||
|
||||
$('#series_languages').dropdown('clear');
|
||||
var languages_array = eval($(this).data("languages"));
|
||||
const languages_array = eval($(this).data("languages"));
|
||||
$('#series_languages').dropdown('set selected',languages_array);
|
||||
|
||||
if ($(this).data("hearing-impaired") == "True") {
|
||||
if ($(this).data("hearing-impaired") === "True") {
|
||||
$("#series_hearing-impaired_div").checkbox('check');
|
||||
} else {
|
||||
$("#series_hearing-impaired_div").checkbox('uncheck');
|
||||
|
@ -450,24 +448,23 @@
|
|||
.modal({
|
||||
centered: true
|
||||
})
|
||||
.modal('show')
|
||||
;
|
||||
})
|
||||
.modal('show');
|
||||
});
|
||||
|
||||
$('.manual_search').click(function(){
|
||||
$('.manual_search').on('click', function(){
|
||||
$("#series_title_span").html($(this).data("series_title"));
|
||||
$("#season").html($(this).data("season"));
|
||||
$("#episode").html($(this).data("episode"));
|
||||
$("#episode_title").html($(this).data("episode_title"));
|
||||
|
||||
episodePath = $(this).attr("data-episodePath"),
|
||||
sceneName = $(this).attr("data-sceneName"),
|
||||
language = $(this).attr("data-language"),
|
||||
hi = $(this).attr("data-hi"),
|
||||
sonarrSeriesId = $(this).attr("data-sonarrSeriesId"),
|
||||
sonarrEpisodeId = $(this).attr("data-sonarrEpisodeId")
|
||||
episodePath = $(this).attr("data-episodePath");
|
||||
sceneName = $(this).attr("data-sceneName");
|
||||
language = $(this).attr("data-language");
|
||||
hi = $(this).attr("data-hi");
|
||||
sonarrSeriesId = $(this).attr("data-sonarrSeriesId");
|
||||
sonarrEpisodeId = $(this).attr("data-sonarrEpisodeId");
|
||||
|
||||
var values = {
|
||||
const values = {
|
||||
episodePath: episodePath,
|
||||
sceneName: sceneName,
|
||||
language: language,
|
||||
|
@ -511,19 +508,19 @@
|
|||
},
|
||||
{ data: null,
|
||||
render: function ( data, type, row ) {
|
||||
var array_matches = data.matches;
|
||||
var array_dont_matches = data.dont_matches;
|
||||
var i;
|
||||
text = '<div class="ui inline dropdown"><i class="green check icon"></i><div class="text">'
|
||||
const array_matches = data.matches;
|
||||
const array_dont_matches = data.dont_matches;
|
||||
let i;
|
||||
let text = '<div class="ui inline dropdown"><i class="green check icon"></i><div class="text">';
|
||||
text += array_matches.length;
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">'
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">';
|
||||
for (i = 0; i < array_matches.length; i++) {
|
||||
text += '<div class="criteria_matched disabled item">' + array_matches[i] + '</div>';
|
||||
}
|
||||
text += '</div></div>';
|
||||
text += '<div class="ui inline dropdown"><i class="red times icon"></i><div class="text">'
|
||||
text += '<div class="ui inline dropdown"><i class="red times icon"></i><div class="text">';
|
||||
text += array_dont_matches.length;
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">'
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">';
|
||||
for (i = 0; i < array_dont_matches.length; i++) {
|
||||
text += '<div class="criteria_not_matched disabled item">' + array_dont_matches[i] + '</div>';
|
||||
}
|
||||
|
@ -543,12 +540,11 @@
|
|||
.modal({
|
||||
centered: false
|
||||
})
|
||||
.modal('show')
|
||||
;
|
||||
})
|
||||
.modal('show');
|
||||
});
|
||||
|
||||
function manual_get(button, episodePath, sceneName, hi, sonarrSeriesId, sonarrEpisodeId){
|
||||
var values = {
|
||||
const values = {
|
||||
subtitle: $(button).attr("data-subtitle"),
|
||||
provider: $(button).attr("data-provider"),
|
||||
episodePath: episodePath,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -23,16 +23,13 @@
|
|||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 1em;
|
||||
overflow-x:auto;
|
||||
}
|
||||
#logs {
|
||||
margin-top: 4em;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -77,16 +74,15 @@
|
|||
|
||||
<script>
|
||||
$('.menu .item')
|
||||
.tab()
|
||||
;
|
||||
.tab();
|
||||
|
||||
$('#series_tab').click(function() {
|
||||
$('#series_tab').on('click', function() {
|
||||
loadURLseries(1);
|
||||
})
|
||||
});
|
||||
|
||||
$('#movies_tab').click(function() {
|
||||
$('#movies_tab').on('click', function() {
|
||||
loadURLmovies(1);
|
||||
})
|
||||
});
|
||||
|
||||
function loadURLseries(page) {
|
||||
$.ajax({
|
||||
|
@ -110,25 +106,25 @@
|
|||
});
|
||||
}
|
||||
|
||||
$('a:not(.tabs), button:not(.cancel, #download_log)').click(function(){
|
||||
$('a:not(.tabs), button:not(.cancel, #download_log)').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
if ($('#series_tab').data("enabled") == "True") {
|
||||
if ($('#series_tab').data("enabled") === "True") {
|
||||
$("#series_tab").removeClass('disabled');
|
||||
} else {
|
||||
$("#series_tab").addClass('disabled');
|
||||
}
|
||||
|
||||
if ($('#movies_tab').data("enabled") == "True") {
|
||||
if ($('#movies_tab').data("enabled") === "True") {
|
||||
$("#movies_tab").removeClass('disabled');
|
||||
} else {
|
||||
$("#movies_tab").addClass('disabled');
|
||||
}
|
||||
if ($('#series_tab').data("enabled") == "True") {
|
||||
if ($('#series_tab').data("enabled") === "True") {
|
||||
$( "#series_tab" ).trigger( "click" );
|
||||
}
|
||||
if ($('#series_tab').data("enabled") == "False" && $('#movies_tab').data("enabled") == "True") {
|
||||
if ($('#series_tab').data("enabled") === "False" && $('#movies_tab').data("enabled") === "True") {
|
||||
$( "#movies_tab" ).trigger( "click" );
|
||||
}
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -21,15 +21,6 @@
|
|||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 3em;
|
||||
overflow-x:auto;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -183,22 +174,22 @@
|
|||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('a, i').click(function(){
|
||||
$('a, i').on('click', function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
$('.fast.backward').on('click', function(){
|
||||
loadURLseries(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.backward:not(.fast)').on('click', function(){
|
||||
loadURLseries({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.forward:not(.fast)').on('click', function(){
|
||||
loadURLseries({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
});
|
||||
$('.fast.forward').on('click', function(){
|
||||
loadURLseries({{int(max_page)}});
|
||||
})
|
||||
});
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -21,15 +21,6 @@
|
|||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 3em;
|
||||
overflow-x:auto;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -198,22 +189,22 @@
|
|||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('a, i').click(function(){
|
||||
$('a, i').on('click', function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
$('.fast.backward').on('click', function(){
|
||||
loadURLseries(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.backward:not(.fast)').on('click', function(){
|
||||
loadURLseries({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.forward:not(.fast)').on('click', function(){
|
||||
loadURLseries({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
});
|
||||
$('.fast.forward').on('click', function(){
|
||||
loadURLseries({{int(max_page)}});
|
||||
})
|
||||
});
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -24,7 +24,7 @@
|
|||
height: 100%;
|
||||
}
|
||||
.image {
|
||||
margin-top: 0px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.column {
|
||||
max-width: 450px;
|
||||
|
@ -64,8 +64,5 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -105,17 +105,16 @@ bug icon \\
|
|||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
});
|
||||
|
||||
$('.log').click(function(){
|
||||
$('.log').on('click', function(){
|
||||
$("#message").html($(this).data("message"));
|
||||
exception = $(this).data("exception");
|
||||
let exception = $(this).data("exception");
|
||||
exception = exception.replace(/'/g,"");
|
||||
exception = exception.replace(/\\n\s\s\s\s/g, "\\n  ");
|
||||
exception = exception.replace(/\\n\s\s\s\s/g, "\\n  ");
|
||||
exception = exception.replace(/\\n\s\s/g, "\\n ");
|
||||
exception = exception.replace(/\\n/g, "<br />")
|
||||
exception = exception.replace(/\\n/g, "<br />");
|
||||
$("#exception").html(exception);
|
||||
$('#modal').modal('show');
|
||||
})
|
||||
});
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<link href="{{base_url}}static/noty/noty.css" rel="stylesheet">
|
||||
|
@ -28,13 +28,13 @@
|
|||
% import sqlite3
|
||||
% from get_settings import get_general_settings
|
||||
|
||||
%if get_general_settings()[24] is True:
|
||||
%if get_general_settings()[24]:
|
||||
% monitored_only_query_string = ' AND monitored = "True"'
|
||||
%else:
|
||||
% monitored_only_query_string = ""
|
||||
%end
|
||||
|
||||
% conn = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
||||
% conn = sqlite3.connect(os.path.join(config_dir, 'db', 'bazarr.db'), timeout=30)
|
||||
% c = conn.cursor()
|
||||
% wanted_series = c.execute("SELECT COUNT(*) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()
|
||||
% wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()
|
||||
|
@ -52,13 +52,13 @@
|
|||
<div class="sixteen wide column">
|
||||
<div class="ui inverted borderless labeled icon massive menu six item">
|
||||
<div class="ui container">
|
||||
% if get_general_settings()[12] is True:
|
||||
% if get_general_settings()[12]:
|
||||
<a class="item" href="{{base_url}}series">
|
||||
<i class="play icon"></i>
|
||||
Series
|
||||
</a>
|
||||
% end
|
||||
% if get_general_settings()[13] is True:
|
||||
% if get_general_settings()[13]:
|
||||
<a class="item" href="{{base_url}}movies">
|
||||
<i class="film icon"></i>
|
||||
Movies
|
||||
|
@ -70,12 +70,12 @@
|
|||
</a>
|
||||
<a class="item" href="{{base_url}}wanted">
|
||||
<i class="warning sign icon">
|
||||
% if get_general_settings()[12] is True:
|
||||
% if get_general_settings()[12]:
|
||||
<div class="floating ui tiny yellow label" style="left:90% !important;top:0.5em !important;">
|
||||
{{wanted_series[0]}}
|
||||
</div>
|
||||
% end
|
||||
% if get_general_settings()[13] is True:
|
||||
% if get_general_settings()[13]:
|
||||
<div class="floating ui tiny green label" style="left:90% !important;top:3em !important;">
|
||||
{{wanted_movies[0]}}
|
||||
</div>
|
||||
|
@ -96,7 +96,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div style='padding-top:0rem;' class="row">
|
||||
<div style='padding-top:0;' class="row">
|
||||
<div class="three wide column"></div>
|
||||
|
||||
<div class="ten wide column">
|
||||
|
@ -135,7 +135,7 @@
|
|||
apiSettings: {
|
||||
url: '{{base_url}}search_json/{query}',
|
||||
onResponse: function(results) {
|
||||
var response = {
|
||||
const response = {
|
||||
results : []
|
||||
};
|
||||
$.each(results.items, function(index, item) {
|
||||
|
@ -156,21 +156,21 @@
|
|||
$('.menu').css('opacity', '0.8');
|
||||
$('#divmenu').css('background', '#000000');
|
||||
$('#divmenu').css('opacity', '0.8');
|
||||
$('#divmenu').css('box-shadow', '0px 0px 5px 5px #000000');
|
||||
$('#divmenu').css('box-shadow', '0 0 5px 5px #000000');
|
||||
}
|
||||
else if (window.location.href.indexOf("movie/") > -1) {
|
||||
$('.menu').css('background', '#000000');
|
||||
$('.menu').css('opacity', '0.8');
|
||||
$('#divmenu').css('background', '#000000');
|
||||
$('#divmenu').css('opacity', '0.8');
|
||||
$('#divmenu').css('box-shadow', '0px 0px 5px 5px #000000');
|
||||
$('#divmenu').css('box-shadow', '0 0 5px 5px #000000');
|
||||
}
|
||||
else {
|
||||
$('.menu').css('background', '#272727');
|
||||
$('#divmenu').css('background', '#272727');
|
||||
}
|
||||
|
||||
$('#restart_link').click(function(){
|
||||
$('#restart_link').on('click', function(){
|
||||
$('#loader_text').text("Bazarr is restarting, please wait...");
|
||||
$.ajax({
|
||||
url: "{{base_url}}restart",
|
||||
|
@ -179,14 +179,14 @@
|
|||
.done(function(){
|
||||
setTimeout(function(){ setInterval(ping, 2000); },8000);
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
% from get_settings import get_general_settings
|
||||
% ip = get_general_settings()[0]
|
||||
% port = get_general_settings()[1]
|
||||
% base_url = get_general_settings()[2]
|
||||
|
||||
if ("{{ip}}" == "0.0.0.0") {
|
||||
if ("{{ip}}" === "0.0.0.0") {
|
||||
public_ip = window.location.hostname;
|
||||
} else {
|
||||
public_ip = "{{ip}}";
|
||||
|
@ -194,7 +194,7 @@
|
|||
|
||||
protocol = window.location.protocol;
|
||||
|
||||
if (window.location.port == '{{current_port}}') {
|
||||
if (window.location.port === '{{current_port}}') {
|
||||
public_port = '{{port}}';
|
||||
} else {
|
||||
public_port = window.location.port;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -36,14 +36,14 @@
|
|||
margin-bottom: 3em;
|
||||
padding: 2em;
|
||||
border-radius: 1px;
|
||||
box-shadow: 0px 0px 5px 5px #000000;
|
||||
box-shadow: 0 0 5px 5px #000000;
|
||||
min-height: calc(250px + 4em);
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
opacity: 0.9;
|
||||
border-radius: 1px;
|
||||
box-shadow: 0px 0px 3px 3px #ffffff;
|
||||
box-shadow: 0 0 3px 3px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding-top: 2em;
|
||||
|
@ -194,12 +194,12 @@
|
|||
%>
|
||||
<a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language))}}" data-hi="{{details[4]}}" data-radarrId={{details[10]}}>
|
||||
{{language_from_alpha2(str(missing_subs_language))}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
%else:
|
||||
<a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top left" data-inverted="" class="get_subtitle ui small red label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language))}}" data-hi="{{details[4]}}" data-radarrId={{details[10]}}>
|
||||
{{language_from_alpha2(str(missing_subs_language))}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
<%
|
||||
end
|
||||
|
@ -209,7 +209,7 @@
|
|||
%>
|
||||
<a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{alpha3_from_alpha2(str(missing_subs_language))}}" data-hi="{{details[4]}}" data-radarrId={{details[10]}}>
|
||||
{{language_from_alpha2(str(missing_subs_language))}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
<%
|
||||
end
|
||||
|
@ -305,18 +305,18 @@
|
|||
</html>
|
||||
|
||||
<script>
|
||||
$('#scan_disk').click(function(){
|
||||
$('#scan_disk').on('click', function(){
|
||||
$('#loader_text').text("Scanning disk for existing subtitles...");
|
||||
window.location = '{{base_url}}scan_disk_movie/{{no}}';
|
||||
})
|
||||
});
|
||||
|
||||
$('#search_missing_subtitles').click(function(){
|
||||
$('#search_missing_subtitles').on('click', function(){
|
||||
$('#loader_text').text("Searching for missing subtitles...");
|
||||
window.location = '{{base_url}}search_missing_subtitles_movie/{{no}}';
|
||||
})
|
||||
});
|
||||
|
||||
$('.remove_subtitles').click(function(){
|
||||
var values = {
|
||||
$('.remove_subtitles').on('click', function(){
|
||||
const values = {
|
||||
moviePath: $(this).attr("data-moviePath"),
|
||||
language: $(this).attr("data-language"),
|
||||
subtitlesPath: $(this).attr("data-subtitlesPath"),
|
||||
|
@ -338,10 +338,10 @@
|
|||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
var values = {
|
||||
$('.get_subtitle').on('click', function(){
|
||||
const values = {
|
||||
moviePath: $(this).attr("data-moviePath"),
|
||||
sceneName: $(this).attr("data-sceneName"),
|
||||
language: $(this).attr("data-language"),
|
||||
|
@ -364,19 +364,18 @@
|
|||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('a, .menu .item, button:not(#config, .cancel, .manual_search)').click(function(){
|
||||
$('a, .menu .item, button:not(#config, .cancel, .manual_search)').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
});
|
||||
|
||||
$('#config').click(function(){
|
||||
$('#config').on('click', function(){
|
||||
$('#movie_form').attr('action', '{{base_url}}edit_movie/{{no}}');
|
||||
|
||||
$("#movie_title").html($(this).data("title"));
|
||||
|
@ -385,10 +384,10 @@
|
|||
$("#movie_audio_language").html($(this).data("audio"));
|
||||
|
||||
$('#movie_languages').dropdown('clear');
|
||||
var languages_array = eval($(this).data("languages"));
|
||||
const languages_array = eval($(this).data("languages"));
|
||||
$('#movie_languages').dropdown('set selected',languages_array);
|
||||
|
||||
if ($(this).data("hearing-impaired") == "True") {
|
||||
if ($(this).data("hearing-impaired") === "True") {
|
||||
$("#movie_hearing-impaired_div").checkbox('check');
|
||||
} else {
|
||||
$("#movie_hearing-impaired_div").checkbox('uncheck');
|
||||
|
@ -398,20 +397,19 @@
|
|||
.modal({
|
||||
centered: true
|
||||
})
|
||||
.modal('show')
|
||||
;
|
||||
})
|
||||
.modal('show');
|
||||
});
|
||||
|
||||
$('.manual_search').click(function(){
|
||||
$('.manual_search').on('click', function(){
|
||||
$("#movie_title_span").html($(this).data("movie_title"));
|
||||
|
||||
moviePath = $(this).attr("data-moviePath"),
|
||||
sceneName = $(this).attr("data-sceneName"),
|
||||
language = $(this).attr("data-language"),
|
||||
hi = $(this).attr("data-hi"),
|
||||
radarrId = $(this).attr("data-radarrId")
|
||||
moviePath = $(this).attr("data-moviePath");
|
||||
sceneName = $(this).attr("data-sceneName");
|
||||
language = $(this).attr("data-language");
|
||||
hi = $(this).attr("data-hi");
|
||||
radarrId = $(this).attr("data-radarrId");
|
||||
|
||||
var values = {
|
||||
const values = {
|
||||
moviePath: moviePath,
|
||||
sceneName: sceneName,
|
||||
language: language,
|
||||
|
@ -454,19 +452,19 @@
|
|||
},
|
||||
{ data: null,
|
||||
render: function ( data, type, row ) {
|
||||
var array_matches = data.matches;
|
||||
var array_dont_matches = data.dont_matches;
|
||||
var i;
|
||||
text = '<div class="ui inline dropdown"><i class="green check icon"></i><div class="text">'
|
||||
const array_matches = data.matches;
|
||||
const array_dont_matches = data.dont_matches;
|
||||
let i;
|
||||
let text = '<div class="ui inline dropdown"><i class="green check icon"></i><div class="text">';
|
||||
text += array_matches.length;
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">'
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">';
|
||||
for (i = 0; i < array_matches.length; i++) {
|
||||
text += '<div class="criteria_matched disabled item">' + array_matches[i] + '</div>';
|
||||
}
|
||||
text += '</div></div>';
|
||||
text += '<div class="ui inline dropdown"><i class="red times icon"></i><div class="text">'
|
||||
text += '<div class="ui inline dropdown"><i class="red times icon"></i><div class="text">';
|
||||
text += array_dont_matches.length;
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">'
|
||||
text += '</div><i class="dropdown icon"></i><div class="menu">';
|
||||
for (i = 0; i < array_dont_matches.length; i++) {
|
||||
text += '<div class="criteria_not_matched disabled item">' + array_dont_matches[i] + '</div>';
|
||||
}
|
||||
|
@ -488,10 +486,10 @@
|
|||
})
|
||||
.modal('show')
|
||||
;
|
||||
})
|
||||
});
|
||||
|
||||
function manual_get(button, episodePath, sceneName, hi, sonarrSeriesId, sonarrEpisodeId){
|
||||
var values = {
|
||||
const values = {
|
||||
subtitle: $(button).attr("data-subtitle"),
|
||||
provider: $(button).attr("data-provider"),
|
||||
moviePath: moviePath,
|
||||
|
@ -515,5 +513,5 @@
|
|||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -23,8 +23,8 @@
|
|||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em 3em 2em 3em;
|
||||
|
@ -100,8 +100,8 @@
|
|||
%end
|
||||
%end
|
||||
</td>
|
||||
<td>{{!"" if row[4] == None else row[4]}}</td>
|
||||
<td {{!"style='background-color: #e8e8e8;'" if row[4] == None else ""}}>
|
||||
<td>{{!"" if row[4] is None else row[4]}}</td>
|
||||
<td {{!"style='background-color: #e8e8e8;'" if row[4] is None else ""}}>
|
||||
<%
|
||||
subs_languages_list = []
|
||||
if subs_languages is not None:
|
||||
|
@ -223,26 +223,26 @@
|
|||
|
||||
$('table').tablesort();
|
||||
|
||||
$('a, button:not(.cancel)').click(function(){
|
||||
$('a, button:not(.cancel)').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
$('.fast.backward').on('click', function(){
|
||||
location.href="?page=1";
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.backward:not(.fast)').on('click', function(){
|
||||
location.href="?page={{int(page)-1}}";
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.forward:not(.fast)').on('click', function(){
|
||||
location.href="?page={{int(page)+1}}";
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
});
|
||||
$('.fast.forward').on('click', function(){
|
||||
location.href="?page={{int(max_page)}}";
|
||||
})
|
||||
});
|
||||
|
||||
$('#movieseditor').click(function(){
|
||||
$('#movieseditor').on('click', function(){
|
||||
window.location = '{{base_url}}movieseditor';
|
||||
})
|
||||
});
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
|
@ -250,7 +250,7 @@
|
|||
})
|
||||
;
|
||||
|
||||
$('.config').click(function(){
|
||||
$('.config').on('click', function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#movies_form').attr('action', '{{base_url}}edit_movie/' + $(this).data("no"));
|
||||
|
@ -264,14 +264,14 @@
|
|||
var languages_array = eval($(this).data("languages"));
|
||||
$('#movies_languages').dropdown('set selected',languages_array);
|
||||
|
||||
if ($(this).data("hearing-impaired") == "True") {
|
||||
if ($(this).data("hearing-impaired") === "True") {
|
||||
$("#movies_hearing-impaired_div").checkbox('check');
|
||||
} else {
|
||||
$("#movies_hearing-impaired_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
$('.small.modal').modal('show');
|
||||
})
|
||||
});
|
||||
|
||||
$('#movies_languages').dropdown();
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -23,8 +23,8 @@
|
|||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em 3em 2em 3em;
|
||||
|
@ -32,9 +32,6 @@
|
|||
#tablemovies {
|
||||
padding-top: 1em;
|
||||
}
|
||||
#divdetails {
|
||||
min-height: 250px;
|
||||
}
|
||||
#bottommenu {
|
||||
background-color: #333333;
|
||||
box-shadow: 0 0 10px 1px #333;
|
||||
|
@ -140,9 +137,9 @@
|
|||
|
||||
$('table').tablesort();
|
||||
|
||||
$('a, button').click(function(){
|
||||
$('a, button').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
|
@ -150,7 +147,7 @@
|
|||
})
|
||||
;
|
||||
|
||||
$('.selected').change(function() {
|
||||
$('.selected').on('change', function() {
|
||||
$("#count").text($('.selected:checked').length);
|
||||
if ( $('.selected:checked').length > 0 ) {
|
||||
$('.select').removeClass('disabled');
|
||||
|
@ -161,19 +158,19 @@
|
|||
$('#save').addClass('disabled');
|
||||
}
|
||||
|
||||
var result = [];
|
||||
const result = [];
|
||||
$('.selected:checked').each(function(i){
|
||||
result.push($(this).attr('id'));
|
||||
});
|
||||
$("#checked").val(result);
|
||||
});
|
||||
|
||||
$('#selectall').change(function() {
|
||||
$('#selectall').on('change', function() {
|
||||
if ( $('#selectall').is(":checked") ) {
|
||||
$('.selected').prop('checked', true).change();
|
||||
$('.selected').prop('checked', true).trigger('change');
|
||||
}
|
||||
else {
|
||||
$('.selected').prop('checked', false).change();
|
||||
$('.selected').prop('checked', false).trigger('change');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
625
views/series.tpl
625
views/series.tpl
|
@ -1,314 +1,313 @@
|
|||
<html>
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
<script src="{{base_url}}static/semantic/semantic.min.js"></script>
|
||||
<link rel="stylesheet" href="{{base_url}}static/semantic/semantic.min.css">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{base_url}}static/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{base_url}}static/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{base_url}}static/favicon-16x16.png">
|
||||
<link rel="manifest" href="{{base_url}}static/manifest.json">
|
||||
<link rel="mask-icon" href="{{base_url}}static/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="{{base_url}}static/favicon.ico">
|
||||
<meta name="msapplication-config" content="{{base_url}}static/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<title>Series - Bazarr</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em 3em 2em 3em;
|
||||
overflow-x:auto;
|
||||
}
|
||||
#tableseries {
|
||||
padding-top: 1em;
|
||||
}
|
||||
#divdetails {
|
||||
min-height: 250px;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; }
|
||||
.fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; }
|
||||
.ui.progress:last-child {margin: 0 0 0em !important;}
|
||||
|
||||
.ui.progress .bar>.progress {
|
||||
right: auto;
|
||||
left: .5em;
|
||||
color: rgba(0, 0, 0, 0.60);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div id="loader_text" class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<div class="ui basic buttons">
|
||||
<button id="serieseditor" class="ui button"><i class="configure icon"></i>Series Editor</button>
|
||||
</div>
|
||||
<table id="tableseries" class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Path</th>
|
||||
<th>Audio language</th>
|
||||
<th>Subtitles languages</th>
|
||||
<th>Hearing-impaired</th>
|
||||
<th class="two wide">Subtitles</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import ast
|
||||
%import os
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td><a href="{{base_url}}episodes/{{row[5]}}">{{row[1]}}</a></td>
|
||||
<td>
|
||||
%if os.path.isdir(row[2]):
|
||||
<span data-tooltip="This path seems to be valid." data-inverted="" data-position="top left"><i class="checkmark icon"></i></span>
|
||||
%else:
|
||||
<span data-tooltip="This path doesn't seems to be valid." data-inverted="" data-position="top left"><i class="warning sign icon"></i></span>
|
||||
%end
|
||||
{{row[2]}}
|
||||
</td>
|
||||
<td>{{row[7]}}</td>
|
||||
<td>
|
||||
%subs_languages = ast.literal_eval(str(row[3]))
|
||||
%if subs_languages is not None:
|
||||
%for subs_language in subs_languages:
|
||||
<div class="ui tiny label">{{subs_language}}</div>
|
||||
%end
|
||||
%end
|
||||
</td>
|
||||
<td>{{!"" if row[4] == None else row[4]}}</td>
|
||||
<td>
|
||||
%total_subs = 0
|
||||
%missing_subs = 0
|
||||
%if not total_subtitles_list:
|
||||
% pass
|
||||
%else:
|
||||
% for total_subtitles in total_subtitles_list:
|
||||
% if total_subtitles[0] == row[5]:
|
||||
% total_subs = total_subtitles[1]
|
||||
% end
|
||||
% end
|
||||
% for missing_subtitles in missing_subtitles_list:
|
||||
% if missing_subtitles[0] == row[5]:
|
||||
% missing_subs = missing_subtitles[1]
|
||||
% end
|
||||
% end
|
||||
%end
|
||||
<div class="ui progress" data-value="{{total_subs - missing_subs}}" data-total="{{total_subs}}">
|
||||
<div class="bar">
|
||||
<div class="progress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td {{!"style='background-color: #e8e8e8;'" if row[4] == None else ""}}>
|
||||
<%
|
||||
subs_languages_list = []
|
||||
if subs_languages is not None:
|
||||
for subs_language in subs_languages:
|
||||
subs_languages_list.append(subs_language)
|
||||
end
|
||||
end
|
||||
%>
|
||||
<div class="config ui inverted basic compact icon" data-tooltip="Edit series" data-inverted="" data-position="top right" data-no="{{row[5]}}" data-title="{{row[1]}}" data-poster="{{row[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{row[4]}}" data-audio="{{row[7]}}">
|
||||
<i class="ui black configure icon"></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
%try: page_size
|
||||
%except NameError: page_size = "25"
|
||||
%end
|
||||
%if page_size != -1:
|
||||
<div class="ui grid">
|
||||
<div class="three column row">
|
||||
<div class="column"></div>
|
||||
<div class="center aligned column">
|
||||
<i class="\\
|
||||
%if page == "1":
|
||||
disabled\\
|
||||
%end
|
||||
fast backward icon"></i>
|
||||
<i class="\\
|
||||
%if page == "1":
|
||||
disabled\\
|
||||
%end
|
||||
backward icon"></i>
|
||||
{{page}} / {{max_page}}
|
||||
<i class="\\
|
||||
%if int(page) == int(max_page):
|
||||
disabled\\
|
||||
%end
|
||||
forward icon"></i>
|
||||
<i class="\\
|
||||
%if int(page) == int(max_page):
|
||||
disabled\\
|
||||
%end
|
||||
fast forward icon"></i>
|
||||
</div>
|
||||
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
%end
|
||||
</div>
|
||||
|
||||
<div class="ui small modal">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">
|
||||
<div id="series_title"></div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form name="series_form" id="series_form" action="" method="post" class="ui form">
|
||||
<div id="divdetails" class="ui grid">
|
||||
<div class="four wide column">
|
||||
<img id="series_poster" class="ui image" src="">
|
||||
</div>
|
||||
<div class="twelve wide column">
|
||||
<div class="ui grid">
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned five wide column">
|
||||
<label>Audio language</label>
|
||||
</div>
|
||||
<div class="nine wide column">
|
||||
<div id="series_audio_language"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned five wide column">
|
||||
<label>Subtitles languages</label>
|
||||
</div>
|
||||
<div class="nine wide column">
|
||||
<select name="languages" id="series_languages" {{!'multiple="" ' if single_language is False else ''}}class="ui fluid selection dropdown">
|
||||
<option value="">Languages</option>
|
||||
%if single_language is True:
|
||||
<option value="None">None</option>
|
||||
%end
|
||||
%for language in languages:
|
||||
<option value="{{language[0]}}">{{language[1]}}</option>
|
||||
%end
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned five wide column">
|
||||
<label>Hearing-impaired</label>
|
||||
</div>
|
||||
<div class="nine wide column">
|
||||
<div id="series_hearing-impaired_div" class="ui toggle checkbox">
|
||||
<input name="hearing_impaired" id="series_hearing-impaired" type="checkbox">
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="ui cancel button" >Cancel</button>
|
||||
<button type="submit" name="save" value="save" form="series_form" class="ui blue approve button">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
% include('footer.tpl')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
if (sessionStorage.scrolly) {
|
||||
$(window).scrollTop(sessionStorage.scrolly);
|
||||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('a, button:not(.cancel)').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
location.href="?page=1";
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
location.href="?page={{int(page)-1}}";
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
location.href="?page={{int(page)+1}}";
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
location.href="?page={{int(max_page)}}";
|
||||
})
|
||||
|
||||
$('#serieseditor').click(function(){
|
||||
window.location = '{{base_url}}serieseditor';
|
||||
})
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
|
||||
$('.config').click(function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#series_form').attr('action', '{{base_url}}edit_series/' + $(this).data("no"));
|
||||
|
||||
$("#series_title").html($(this).data("title"));
|
||||
$("#series_poster").attr("src", "{{base_url}}image_proxy" + $(this).data("poster"));
|
||||
|
||||
$("#series_audio_language").html($(this).data("audio"));
|
||||
|
||||
$('#series_languages').dropdown('clear');
|
||||
var languages_array = eval($(this).data("languages"));
|
||||
$('#series_languages').dropdown('set selected',languages_array);
|
||||
|
||||
if ($(this).data("hearing-impaired") == "True") {
|
||||
$("#series_hearing-impaired_div").checkbox('check');
|
||||
} else {
|
||||
$("#series_hearing-impaired_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
$('.small.modal').modal('show');
|
||||
})
|
||||
|
||||
$('#series_languages').dropdown();
|
||||
|
||||
$('.progress').progress({
|
||||
label: 'ratio',
|
||||
text: {
|
||||
ratio: '{value} / {total}'
|
||||
},
|
||||
showActivity: false
|
||||
});
|
||||
|
||||
$( ".progress" ).each(function() {
|
||||
if ($(this).progress('is complete') != true) {
|
||||
$(this).addClass('yellow');
|
||||
}
|
||||
if ($(this).progress('get total') == 0) {
|
||||
$(this).progress('update progress', '99');
|
||||
$(this).addClass('grey disabled');
|
||||
$(this).progress('set bar label', '0 / 0');
|
||||
}
|
||||
});
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
<script src="{{base_url}}static/semantic/semantic.min.js"></script>
|
||||
<link rel="stylesheet" href="{{base_url}}static/semantic/semantic.min.css">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{base_url}}static/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{base_url}}static/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{base_url}}static/favicon-16x16.png">
|
||||
<link rel="manifest" href="{{base_url}}static/manifest.json">
|
||||
<link rel="mask-icon" href="{{base_url}}static/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="{{base_url}}static/favicon.ico">
|
||||
<meta name="msapplication-config" content="{{base_url}}static/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<title>Series - Bazarr</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em 3em 2em 3em;
|
||||
overflow-x:auto;
|
||||
}
|
||||
#tableseries {
|
||||
padding-top: 1em;
|
||||
}
|
||||
#divdetails {
|
||||
min-height: 250px;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; }
|
||||
.fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; }
|
||||
.ui.progress:last-child {margin: 0 0 0 !important;}
|
||||
|
||||
.ui.progress .bar>.progress {
|
||||
right: auto;
|
||||
left: .5em;
|
||||
color: rgba(0, 0, 0, 0.60);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div id="loader_text" class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<div class="ui basic buttons">
|
||||
<button id="serieseditor" class="ui button"><i class="configure icon"></i>Series Editor</button>
|
||||
</div>
|
||||
<table id="tableseries" class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Path</th>
|
||||
<th>Audio language</th>
|
||||
<th>Subtitles languages</th>
|
||||
<th>Hearing-impaired</th>
|
||||
<th class="two wide">Subtitles</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import ast
|
||||
%import os
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td><a href="{{base_url}}episodes/{{row[5]}}">{{row[1]}}</a></td>
|
||||
<td>
|
||||
%if os.path.isdir(row[2]):
|
||||
<span data-tooltip="This path seems to be valid." data-inverted="" data-position="top left"><i class="checkmark icon"></i></span>
|
||||
%else:
|
||||
<span data-tooltip="This path doesn't seems to be valid." data-inverted="" data-position="top left"><i class="warning sign icon"></i></span>
|
||||
%end
|
||||
{{row[2]}}
|
||||
</td>
|
||||
<td>{{row[7]}}</td>
|
||||
<td>
|
||||
%subs_languages = ast.literal_eval(str(row[3]))
|
||||
%if subs_languages is not None:
|
||||
%for subs_language in subs_languages:
|
||||
<div class="ui tiny label">{{subs_language}}</div>
|
||||
%end
|
||||
%end
|
||||
</td>
|
||||
<td>{{!"" if row[4] == None else row[4]}}</td>
|
||||
<td>
|
||||
%total_subs = 0
|
||||
%missing_subs = 0
|
||||
%if not total_subtitles_list:
|
||||
% pass
|
||||
%else:
|
||||
% for total_subtitles in total_subtitles_list:
|
||||
% if total_subtitles[0] == row[5]:
|
||||
% total_subs = total_subtitles[1]
|
||||
% end
|
||||
% end
|
||||
% for missing_subtitles in missing_subtitles_list:
|
||||
% if missing_subtitles[0] == row[5]:
|
||||
% missing_subs = missing_subtitles[1]
|
||||
% end
|
||||
% end
|
||||
%end
|
||||
<div class="ui progress" data-value="{{total_subs - missing_subs}}" data-total="{{total_subs}}">
|
||||
<div class="bar">
|
||||
<div class="progress"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td {{!"style='background-color: #e8e8e8;'" if row[4] == None else ""}}>
|
||||
<%
|
||||
subs_languages_list = []
|
||||
if subs_languages is not None:
|
||||
for subs_language in subs_languages:
|
||||
subs_languages_list.append(subs_language)
|
||||
end
|
||||
end
|
||||
%>
|
||||
<div class="config ui inverted basic compact icon" data-tooltip="Edit series" data-inverted="" data-position="top right" data-no="{{row[5]}}" data-title="{{row[1]}}" data-poster="{{row[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{row[4]}}" data-audio="{{row[7]}}">
|
||||
<i class="ui black configure icon"></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
%try: page_size
|
||||
%except NameError: page_size = "25"
|
||||
%end
|
||||
%if page_size != -1:
|
||||
<div class="ui grid">
|
||||
<div class="three column row">
|
||||
<div class="column"></div>
|
||||
<div class="center aligned column">
|
||||
<i class="\\
|
||||
%if page == "1":
|
||||
disabled\\
|
||||
%end
|
||||
fast backward icon"></i>
|
||||
<i class="\\
|
||||
%if page == "1":
|
||||
disabled\\
|
||||
%end
|
||||
backward icon"></i>
|
||||
{{page}} / {{max_page}}
|
||||
<i class="\\
|
||||
%if int(page) == int(max_page):
|
||||
disabled\\
|
||||
%end
|
||||
forward icon"></i>
|
||||
<i class="\\
|
||||
%if int(page) == int(max_page):
|
||||
disabled\\
|
||||
%end
|
||||
fast forward icon"></i>
|
||||
</div>
|
||||
<div class="right floated right aligned column">Total records: {{missing_count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
%end
|
||||
</div>
|
||||
|
||||
<div class="ui small modal">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">
|
||||
<div id="series_title"></div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form name="series_form" id="series_form" action="" method="post" class="ui form">
|
||||
<div id="divdetails" class="ui grid">
|
||||
<div class="four wide column">
|
||||
<img id="series_poster" class="ui image" src="">
|
||||
</div>
|
||||
<div class="twelve wide column">
|
||||
<div class="ui grid">
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned five wide column">
|
||||
<label>Audio language</label>
|
||||
</div>
|
||||
<div class="nine wide column">
|
||||
<div id="series_audio_language"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned five wide column">
|
||||
<label>Subtitles languages</label>
|
||||
</div>
|
||||
<div class="nine wide column">
|
||||
<select name="languages" id="series_languages" {{!'multiple="" ' if single_language is False else ''}}class="ui fluid selection dropdown">
|
||||
<option value="">Languages</option>
|
||||
%if single_language is True:
|
||||
<option value="None">None</option>
|
||||
%end
|
||||
%for language in languages:
|
||||
<option value="{{language[0]}}">{{language[1]}}</option>
|
||||
%end
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned five wide column">
|
||||
<label>Hearing-impaired</label>
|
||||
</div>
|
||||
<div class="nine wide column">
|
||||
<div id="series_hearing-impaired_div" class="ui toggle checkbox">
|
||||
<input name="hearing_impaired" id="series_hearing-impaired" type="checkbox">
|
||||
<label></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="ui cancel button" >Cancel</button>
|
||||
<button type="submit" name="save" value="save" form="series_form" class="ui blue approve button">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
% include('footer.tpl')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
if (sessionStorage.scrolly) {
|
||||
$(window).scrollTop(sessionStorage.scrolly);
|
||||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('a, button:not(.cancel)').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
});
|
||||
|
||||
$('.fast.backward').on('click', function(){
|
||||
location.href="?page=1";
|
||||
});
|
||||
$('.backward:not(.fast)').on('click', function(){
|
||||
location.href="?page={{int(page)-1}}";
|
||||
});
|
||||
$('.forward:not(.fast)').on('click', function(){
|
||||
location.href="?page={{int(page)+1}}";
|
||||
});
|
||||
$('.fast.forward').on('click', function(){
|
||||
location.href="?page={{int(max_page)}}";
|
||||
});
|
||||
|
||||
$('#serieseditor').on('click', function(){
|
||||
window.location = '{{base_url}}serieseditor';
|
||||
});
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
});
|
||||
|
||||
$('.config').on('click', function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#series_form').attr('action', '{{base_url}}edit_series/' + $(this).data("no"));
|
||||
|
||||
$("#series_title").html($(this).data("title"));
|
||||
$("#series_poster").attr("src", "{{base_url}}image_proxy" + $(this).data("poster"));
|
||||
|
||||
$("#series_audio_language").html($(this).data("audio"));
|
||||
|
||||
$('#series_languages').dropdown('clear');
|
||||
const languages_array = eval($(this).data("languages"));
|
||||
$('#series_languages').dropdown('set selected',languages_array);
|
||||
|
||||
if ($(this).data("hearing-impaired") === "True") {
|
||||
$("#series_hearing-impaired_div").checkbox('check');
|
||||
} else {
|
||||
$("#series_hearing-impaired_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
$('.small.modal').modal('show');
|
||||
});
|
||||
|
||||
$('#series_languages').dropdown();
|
||||
|
||||
$('.progress').progress({
|
||||
label: 'ratio',
|
||||
text: {
|
||||
ratio: '{value} / {total}'
|
||||
},
|
||||
showActivity: false
|
||||
});
|
||||
|
||||
$( ".progress" ).each(function() {
|
||||
if ($(this).progress('is complete') !== true) {
|
||||
$(this).addClass('yellow');
|
||||
}
|
||||
if ($(this).progress('get total') == 0) {
|
||||
$(this).progress('update progress', '99');
|
||||
$(this).addClass('grey disabled');
|
||||
$(this).progress('set bar label', '0 / 0');
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -23,8 +23,8 @@
|
|||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em 3em 2em 3em;
|
||||
|
@ -32,9 +32,6 @@
|
|||
#tableseries {
|
||||
padding-top: 1em;
|
||||
}
|
||||
#divdetails {
|
||||
min-height: 250px;
|
||||
}
|
||||
#bottommenu {
|
||||
background-color: #333333;
|
||||
box-shadow: 0 0 10px 1px #333;
|
||||
|
@ -90,7 +87,7 @@
|
|||
%end
|
||||
%end
|
||||
</td>
|
||||
<td>{{!"" if row[4] == None else row[4]}}</td>
|
||||
<td>{{!"" if row[4] is None else row[4]}}</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
|
@ -140,17 +137,16 @@
|
|||
|
||||
$('table').tablesort();
|
||||
|
||||
$('a, button').click(function(){
|
||||
$('a, button').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
});
|
||||
|
||||
$('.selected').change(function() {
|
||||
$('.selected').on('change', function() {
|
||||
$("#count").text($('.selected:checked').length);
|
||||
if ( $('.selected:checked').length > 0 ) {
|
||||
$('.select').removeClass('disabled');
|
||||
|
@ -161,19 +157,19 @@
|
|||
$('#save').addClass('disabled');
|
||||
}
|
||||
|
||||
var result = [];
|
||||
const result = [];
|
||||
$('.selected:checked').each(function(i){
|
||||
result.push($(this).attr('id'));
|
||||
});
|
||||
$("#checked").val(result);
|
||||
});
|
||||
|
||||
$('#selectall').change(function() {
|
||||
$('#selectall').on('change', function() {
|
||||
if ( $('#selectall').is(":checked") ) {
|
||||
$('.selected').prop('checked', true).change();
|
||||
$('.selected').prop('checked', true).trigger('change');
|
||||
}
|
||||
else {
|
||||
$('.selected').prop('checked', false).change();
|
||||
$('.selected').prop('checked', false).trigger('change');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -23,8 +23,8 @@
|
|||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 1em;
|
||||
|
@ -115,7 +115,7 @@
|
|||
</div>
|
||||
<div class="five wide column">
|
||||
<div class="ui fluid input">
|
||||
%if settings_general[2] == None:
|
||||
%if settings_general[2] is None:
|
||||
% base_url = "/"
|
||||
%else:
|
||||
% base_url = settings_general[2]
|
||||
|
@ -1348,6 +1348,7 @@
|
|||
<div class='field'>
|
||||
<div id="settings_notifier_{{notifier[0]}}_url_div" class="ui fluid input">
|
||||
<input name="settings_notifier_{{notifier[0]}}_url" type="text" value="{{notifier[1] if notifier[1] != None else ''}}">
|
||||
<div class="test_notification ui blue button" data-notification="{{notifier[1]}}">Test Notification</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1364,6 +1365,24 @@
|
|||
|
||||
|
||||
<script>
|
||||
$('.test_notification').on('click', function() {
|
||||
const url_field = $(this).prev().val();
|
||||
const url_protocol = url_field.split(':')[0];
|
||||
const url_string = url_field.split('://')[1];
|
||||
alert(url_protocol);
|
||||
alert(url_string);
|
||||
|
||||
$.ajax({
|
||||
url: "{{base_url}}test_notification/" + url_protocol + "/" + encodeURIComponent(url_string),
|
||||
beforeSend: function () {
|
||||
$('#loader').addClass('active');
|
||||
},
|
||||
complete: function () {
|
||||
$('#loader').removeClass('active');
|
||||
},
|
||||
cache: false
|
||||
});
|
||||
});
|
||||
|
||||
% from get_argv import no_update
|
||||
% if no_update is True:
|
||||
|
@ -1374,69 +1393,69 @@
|
|||
.tab()
|
||||
;
|
||||
|
||||
$('a:not(.tabs), button:not(.cancel, .test)').click(function(){
|
||||
$('a:not(.tabs), button:not(.cancel, .test)').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('a[target="_blank"]').click(function(){
|
||||
$('a[target="_blank"]').on('click', function(){
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
if ($('#sonarr_ssl_div').data("ssl") == "True") {
|
||||
if ($('#sonarr_ssl_div').data("ssl") === "True") {
|
||||
$("#sonarr_ssl_div").checkbox('check');
|
||||
} else {
|
||||
$("#sonarr_ssl_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#radarr_ssl_div').data("ssl") == "True") {
|
||||
if ($('#radarr_ssl_div').data("ssl") === "True") {
|
||||
$("#radarr_ssl_div").checkbox('check');
|
||||
} else {
|
||||
$("#radarr_ssl_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_automatic_div').data("automatic") == "True") {
|
||||
if ($('#settings_automatic_div').data("automatic") === "True") {
|
||||
$("#settings_automatic_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_automatic_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_debug').data("debug") == "True") {
|
||||
if ($('#settings_debug').data("debug") === "True") {
|
||||
$("#settings_debug").checkbox('check');
|
||||
} else {
|
||||
$("#settings_debug").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_single_language').data("single-language") == "True") {
|
||||
if ($('#settings_single_language').data("single-language") === "True") {
|
||||
$("#settings_single_language").checkbox('check');
|
||||
} else {
|
||||
$("#settings_single_language").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_scenename').data("scenename") == "True") {
|
||||
if ($('#settings_scenename').data("scenename") === "True") {
|
||||
$("#settings_scenename").checkbox('check');
|
||||
} else {
|
||||
$("#settings_scenename").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_embedded').data("embedded") == "True") {
|
||||
if ($('#settings_embedded').data("embedded") === "True") {
|
||||
$("#settings_embedded").checkbox('check');
|
||||
} else {
|
||||
$("#settings_embedded").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_only_monitored').data("monitored") == "True") {
|
||||
if ($('#settings_only_monitored').data("monitored") === "True") {
|
||||
$("#settings_only_monitored").checkbox('check');
|
||||
} else {
|
||||
$("#settings_only_monitored").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_adaptive_searching').data("adaptive") == "True") {
|
||||
if ($('#settings_adaptive_searching').data("adaptive") === "True") {
|
||||
$("#settings_adaptive_searching").checkbox('check');
|
||||
} else {
|
||||
$("#settings_adaptive_searching").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_use_postprocessing').data("postprocessing") == "True") {
|
||||
if ($('#settings_use_postprocessing').data("postprocessing") === "True") {
|
||||
$("#settings_use_postprocessing").checkbox('check');
|
||||
$("#settings_general_postprocessing_cmd_div").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1444,7 +1463,7 @@
|
|||
$("#settings_general_postprocessing_cmd_div").addClass('disabled');
|
||||
}
|
||||
|
||||
$("#settings_use_postprocessing").change(function(i, obj) {
|
||||
$("#settings_use_postprocessing").on('change', function(i, obj) {
|
||||
if ($("#settings_use_postprocessing").checkbox('is checked')) {
|
||||
$("#settings_general_postprocessing_cmd_div").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1452,7 +1471,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#settings_use_sonarr').data("enabled") == "True") {
|
||||
if ($('#settings_use_sonarr').data("enabled") === "True") {
|
||||
$("#settings_use_sonarr").checkbox('check');
|
||||
$("#sonarr_tab").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1472,7 +1491,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#settings_use_radarr').data("enabled") == "True") {
|
||||
if ($('#settings_use_radarr').data("enabled") === "True") {
|
||||
$("#settings_use_radarr").checkbox('check');
|
||||
$("#radarr_tab").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1492,17 +1511,17 @@
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#settings_auth_type').val() == "None") {
|
||||
if ($('#settings_auth_type').val() === "None") {
|
||||
$('.auth_option').hide();
|
||||
};
|
||||
}
|
||||
|
||||
$('#settings_auth_type').dropdown('setting', 'onChange', function(){
|
||||
if ($('#settings_auth_type').val() == "None") {
|
||||
if ($('#settings_auth_type').val() === "None") {
|
||||
$('.auth_option').hide();
|
||||
}
|
||||
else {
|
||||
$('.auth_option').show();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Load default value for Settings_auth_type
|
||||
|
@ -1510,8 +1529,8 @@
|
|||
$('#settings_auth_type').dropdown('set selected','{{!settings_auth[0]}}');
|
||||
|
||||
// Remove value from Password input when changing to Form login to prevent bad password saving
|
||||
$("#settings_auth_type").change(function() {
|
||||
if ($(this).val() == 'form'){
|
||||
$("#settings_auth_type").on('change', function() {
|
||||
if ($(this).val() === 'form'){
|
||||
$('#settings_auth_password').val('');
|
||||
}
|
||||
else {
|
||||
|
@ -1522,7 +1541,7 @@
|
|||
$('#settings_languages').dropdown('setting', 'onAdd', function(val, txt){
|
||||
$("#settings_serie_default_languages").append(
|
||||
$("<option></option>").attr("value", val).text(txt)
|
||||
)
|
||||
);
|
||||
$("#settings_movie_default_languages").append(
|
||||
$("<option></option>").attr("value", val).text(txt)
|
||||
)
|
||||
|
@ -1536,13 +1555,13 @@
|
|||
$("#settings_movie_default_languages option[value='" + val + "']").remove();
|
||||
});
|
||||
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_serie_default_enabled_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_serie_default_enabled_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_serie_default_languages").removeClass('disabled');
|
||||
$("#settings_serie_default_hi_div").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1561,19 +1580,19 @@
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#settings_serie_default_hi_div').data("hi") == "True") {
|
||||
if ($('#settings_serie_default_hi_div').data("hi") === "True") {
|
||||
$("#settings_serie_default_hi_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_serie_default_hi_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_movie_default_enabled_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_movie_default_enabled_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_movie_default_languages").removeClass('disabled');
|
||||
$("#settings_movie_default_hi_div").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1592,7 +1611,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#settings_movie_default_hi_div').data("hi") == "True") {
|
||||
if ($('#settings_movie_default_hi_div').data("hi") === "True") {
|
||||
$("#settings_movie_default_hi_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_movie_default_hi_div").checkbox('uncheck');
|
||||
|
@ -1610,7 +1629,7 @@
|
|||
$("#settings_movie_default_languages").attr('multiple');
|
||||
}
|
||||
|
||||
$("#settings_single_language").change(function(i, obj) {
|
||||
$("#settings_single_language").on('change', function() {
|
||||
if ($("#settings_single_language").checkbox('is checked')) {
|
||||
$("#settings_serie_default_languages").dropdown('clear');
|
||||
$("#settings_movie_default_languages").dropdown('clear');
|
||||
|
@ -1632,8 +1651,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('.notifier_enabled').each(function(i, obj) {
|
||||
if ($(this).data("enabled") == 1) {
|
||||
$('.notifier_enabled').each(function() {
|
||||
if ($(this).data("enabled") === 1) {
|
||||
$(this).checkbox('check');
|
||||
$('[id=\"' + $(this).data("notifier-url-div") + '\"]').removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1642,7 +1661,7 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('.notifier_enabled').change(function(i, obj) {
|
||||
$('.notifier_enabled').on('change', function() {
|
||||
if ($(this).checkbox('is checked')) {
|
||||
$('[id=\"' + $(this).data("notifier-url-div") + '\"]').removeClass('disabled');
|
||||
} else {
|
||||
|
@ -1830,31 +1849,31 @@
|
|||
})
|
||||
;
|
||||
|
||||
if ($('#settings_proxy_type').val() == "None") {
|
||||
if ($('#settings_proxy_type').val() === "None") {
|
||||
$('.proxy_option').hide();
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_url', 'empty')
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'empty')
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'integer[1..65535]')
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_url', 'empty');
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'empty');
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'integer[1..65535]');
|
||||
}
|
||||
else {
|
||||
$('#settings_form').form('add rule', 'settings_proxy_url', 'empty')
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'empty')
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'integer[1..65535]')
|
||||
};
|
||||
$('#settings_form').form('add rule', 'settings_proxy_url', 'empty');
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'empty');
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'integer[1..65535]');
|
||||
}
|
||||
|
||||
$('#settings_proxy_type').dropdown('setting', 'onChange', function(){
|
||||
if ($('#settings_proxy_type').val() == "None") {
|
||||
if ($('#settings_proxy_type').val() === "None") {
|
||||
$('.proxy_option').hide();
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_url', 'empty')
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'empty')
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'integer[1..65535]')
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_url', 'empty');
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'empty');
|
||||
$('#settings_form').form('remove rule', 'settings_proxy_port', 'integer[1..65535]');
|
||||
}
|
||||
else {
|
||||
$('.proxy_option').show();
|
||||
$('#settings_form').form('add rule', 'settings_proxy_url', 'empty')
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'empty')
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'integer[1..65535]')
|
||||
};
|
||||
$('#settings_form').form('add rule', 'settings_proxy_url', 'empty');
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'empty');
|
||||
$('#settings_form').form('add rule', 'settings_proxy_port', 'integer[1..65535]');
|
||||
}
|
||||
});
|
||||
|
||||
$('#settings_providers').dropdown('setting', 'onChange', function(){
|
||||
|
@ -1864,33 +1883,33 @@
|
|||
$('.form').form('validate field', 'settings_subliminal_languages');
|
||||
});
|
||||
|
||||
$('.submit').click(function() {
|
||||
$('.submit').on('click', function() {
|
||||
alert('Settings saved.');
|
||||
})
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
$(function() {
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
});
|
||||
|
||||
$('#settings_form').focusout(function() {
|
||||
$('#settings_form').on('focusout', function() {
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('#settings_auth_username').keyup(function() {
|
||||
$('#settings_auth_username').on('keyup', function() {
|
||||
$('#settings_auth_password').val('');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('#sonarr_validate').click(function() {
|
||||
$('#sonarr_validate').on('click', function() {
|
||||
if ($('#sonarr_ssl_div').checkbox('is checked')) {
|
||||
protocol = 'https';
|
||||
} else {
|
||||
protocol = 'http';
|
||||
}
|
||||
sonarr_url = $('#settings_sonarr_ip').val() + ":" + $('#settings_sonarr_port').val() + $('#settings_sonarr_baseurl').val().replace(/\/$/, "") + "/api/system/status?apikey=" + $('#settings_sonarr_apikey').val();
|
||||
const sonarr_url = $('#settings_sonarr_ip').val() + ":" + $('#settings_sonarr_port').val() + $('#settings_sonarr_baseurl').val().replace(/\/$/, "") + "/api/system/status?apikey=" + $('#settings_sonarr_apikey').val();
|
||||
|
||||
$.getJSON("{{base_url}}test_url/" + protocol + "/" + encodeURIComponent(sonarr_url), function (data) {
|
||||
if (data.status) {
|
||||
|
@ -1905,31 +1924,31 @@
|
|||
$('#loader').removeClass('active');
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('.sonarr_config').keyup(function() {
|
||||
$('.sonarr_config').on('keyup', function() {
|
||||
$('#sonarr_validated').checkbox('uncheck');
|
||||
$('#sonarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('#settings_sonarr_ssl').change(function() {
|
||||
$('#settings_sonarr_ssl').on('change', function() {
|
||||
$('#sonarr_validated').checkbox('uncheck');
|
||||
$('#sonarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$("#sonarr_validated").checkbox('check');
|
||||
|
||||
$('#radarr_validate').click(function() {
|
||||
$('#radarr_validate').on('click', function() {
|
||||
if ($('#radarr_ssl_div').checkbox('is checked')) {
|
||||
protocol = 'https';
|
||||
} else {
|
||||
protocol = 'http';
|
||||
}
|
||||
radarr_url = $('#settings_radarr_ip').val() + ":" + $('#settings_radarr_port').val() + $('#settings_radarr_baseurl').val().replace(/\/$/, "") + "/api/system/status?apikey=" + $('#settings_radarr_apikey').val();
|
||||
const radarr_url = $('#settings_radarr_ip').val() + ":" + $('#settings_radarr_port').val() + $('#settings_radarr_baseurl').val().replace(/\/$/, "") + "/api/system/status?apikey=" + $('#settings_radarr_apikey').val();
|
||||
|
||||
$.getJSON("{{base_url}}test_url/" + protocol + "/" + encodeURIComponent(radarr_url), function (data) {
|
||||
if (data.status) {
|
||||
|
@ -1944,21 +1963,21 @@
|
|||
$('#loader').removeClass('active');
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('.radarr_config').keyup(function() {
|
||||
$('.radarr_config').on('keyup', function() {
|
||||
$('#radarr_validated').checkbox('uncheck');
|
||||
$('#radarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('#settings_radarr_ssl').change(function() {
|
||||
$('#settings_radarr_ssl').on('change', function() {
|
||||
$('#radarr_validated').checkbox('uncheck');
|
||||
$('#radarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$("#radarr_validated").checkbox('check');
|
||||
</script>
|
||||
|
|
825
views/system.tpl
825
views/system.tpl
|
@ -1,412 +1,415 @@
|
|||
<html>
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
<script src="{{base_url}}static/semantic/semantic.min.js"></script>
|
||||
<script src="{{base_url}}static/jquery/tablesort.js"></script>
|
||||
<link rel="stylesheet" href="{{base_url}}static/semantic/semantic.min.css">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{base_url}}static/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{base_url}}static/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{base_url}}static/favicon-16x16.png">
|
||||
<link rel="manifest" href="{{base_url}}static/manifest.json">
|
||||
<link rel="mask-icon" href="{{base_url}}static/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="{{base_url}}static/favicon.ico">
|
||||
<meta name="msapplication-config" content="{{base_url}}static/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<title>System - Bazarr</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 1em;
|
||||
}
|
||||
#logs {
|
||||
margin-top: 4em;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; }
|
||||
.fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div id='loader_text' class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<div class="ui basic icon buttons" style="float: right;">
|
||||
<div id="shutdown" class="ui icon button" data-tooltip="Shutdown" data-inverted=""><i class="red power off icon"></i></div>
|
||||
<div id="restart" class="ui icon button" data-tooltip="Restart" data-inverted=""><i class="redo alternate icon"></i></div>
|
||||
% from get_settings import get_auth_settings
|
||||
% if get_auth_settings()[0] != 'None':
|
||||
<div id="logout" class="ui icon button" data-tooltip="Logout" data-inverted=""><i class="sign-out icon"></i></div>
|
||||
% end
|
||||
</div>
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="tabs item active" data-tab="tasks">Tasks</a>
|
||||
<a class="tabs item" data-tab="logs">Logs</a>
|
||||
<a class="tabs item" data-tab="status">Status</a>
|
||||
<a class="tabs item" data-tab="releases">Releases</a>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment active" data-tab="tasks">
|
||||
<div class="content">
|
||||
<table class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Execution Frequency</th>
|
||||
<th>Next Execution</th>
|
||||
<th class="collapsing"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for task in task_list:
|
||||
<tr>
|
||||
<td>{{task[0]}}</td>
|
||||
<td>{{task[1]}}</td>
|
||||
<td>{{task[2]}}</td>
|
||||
<td class="collapsing">
|
||||
<div class="execute ui inverted basic compact icon" data-tooltip="Execute {{task[0]}}" data-inverted="" data-taskid='{{task[3]}}'>
|
||||
<i class="ui black refresh icon"></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="logs">
|
||||
<div class="ui left floated basic buttons">
|
||||
<button id="refresh_log" class="ui button"><i class="refresh icon"></i>Refresh current page</button>
|
||||
</div>
|
||||
<div class="ui right floated basic buttons">
|
||||
<button id="download_log" class="ui button"><i class="download icon"></i>Download log file</button>
|
||||
<button id="empty_log" class="ui button"><i class="download icon"></i>Empty log file</button>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div id="logs"></div>
|
||||
|
||||
%try: page_size
|
||||
%except NameError: page_size = "25"
|
||||
%end
|
||||
%if page_size != -1:
|
||||
<div class="ui grid">
|
||||
<div class="three column row">
|
||||
<div class="column"></div>
|
||||
<div class="center aligned column">
|
||||
<i class="fast backward icon"></i>
|
||||
<i class="backward icon"></i>
|
||||
<span id="page"></span> / {{max_page}}
|
||||
<i class="forward icon"></i>
|
||||
<i class="fast forward icon"></i>
|
||||
</div>
|
||||
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
%end
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="status">
|
||||
<div class="ui dividing header">About</div>
|
||||
<div class="twelve wide column">
|
||||
<div class="ui grid">
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Bazarr version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{bazarr_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% from get_settings import get_general_settings
|
||||
% if get_general_settings()[12]:
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Sonarr version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{sonarr_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% end
|
||||
% if get_general_settings()[13]:
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Radarr version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{radarr_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% end
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Operating system</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{operating_system}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Python version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{python_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Bazarr directory</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{bazarr_dir}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Bazarr config directory</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{config_dir}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui dividing header">More info</div>
|
||||
<div class="twelve wide column">
|
||||
<div class="ui grid">
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Source</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
<i class="github icon"></i><a href="https://github.com/morpheus65535/bazarr">Bazarr on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Wiki</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
<i class="wikipedia w icon"></i><a href="https://github.com/morpheus65535/bazarr/wiki">Bazarr Wiki</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Discord</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
<i class="discord icon"></i><a href="https://discord.gg/MH2e2eb">Bazarr on Discord</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui bottom attached tab segment" data-tab="releases">
|
||||
%for release in releases:
|
||||
<h2 class="ui header">
|
||||
%if release[0][1:] == bazarr_version:
|
||||
{{release[0]}} <div class="ui green label">Current version</div>
|
||||
%else:
|
||||
{{release[0]}}
|
||||
%end
|
||||
</h2>
|
||||
<div class="ui list">
|
||||
%release_lines = release[1].split('\r\n')
|
||||
%for i, release_line in enumerate(release_lines):
|
||||
%if i == 0:
|
||||
<div class="item">
|
||||
<div><h4>{{release_line}}</h4></div>
|
||||
<div class="list">
|
||||
%else:
|
||||
<div class="item">{{release_line}}</div>
|
||||
%end
|
||||
%end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
%end
|
||||
</div>
|
||||
</div>
|
||||
% include('footer.tpl')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
$('.menu .item')
|
||||
.tab()
|
||||
;
|
||||
|
||||
function loadURL(page) {
|
||||
$.ajax({
|
||||
url: "{{base_url}}logs/" + page,
|
||||
beforeSend: function() { $('#loader').addClass('active'); },
|
||||
complete: function() { $('#loader').removeClass('active'); },
|
||||
cache: false
|
||||
}).done(function(data) {
|
||||
$("#logs").html(data);
|
||||
});
|
||||
|
||||
current_page = page;
|
||||
|
||||
$("#page").text(current_page);
|
||||
if (current_page == 1) {
|
||||
$(".backward, .fast.backward").addClass("disabled");
|
||||
}
|
||||
if (current_page == {{int(max_page)}}) {
|
||||
$(".forward, .fast.forward").addClass("disabled");
|
||||
}
|
||||
if (current_page > 1 && current_page < {{int(max_page)}}) {
|
||||
$(".backward, .fast.backward").removeClass("disabled");
|
||||
$(".forward, .fast.forward").removeClass("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
loadURL(1);
|
||||
|
||||
$('.backward').click(function(){
|
||||
loadURL(current_page - 1);
|
||||
})
|
||||
$('.fast.backward').click(function(){
|
||||
loadURL(1);
|
||||
})
|
||||
$('.forward').click(function(){
|
||||
loadURL(current_page + 1);
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
loadURL({{int(max_page)}});
|
||||
})
|
||||
|
||||
$('#refresh_log').click(function(){
|
||||
loadURL(current_page);
|
||||
})
|
||||
|
||||
$('#download_log').click(function(){
|
||||
window.location = '{{base_url}}bazarr.log';
|
||||
})
|
||||
|
||||
$('#empty_log').click(function(){
|
||||
window.location = '{{base_url}}emptylog';
|
||||
})
|
||||
|
||||
$('.execute').click(function(){
|
||||
window.location = '{{base_url}}execute/' + $(this).data("taskid");
|
||||
})
|
||||
|
||||
$('a:not(.tabs), button:not(.cancel, #download_log), #restart').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('#shutdown').click(function(){
|
||||
$.ajax({
|
||||
url: "{{base_url}}shutdown",
|
||||
async: false
|
||||
})
|
||||
.always(function(){
|
||||
document.open();
|
||||
document.write('Bazarr has shutdown.');
|
||||
document.close();
|
||||
});
|
||||
})
|
||||
|
||||
$('#logout').click(function(){
|
||||
window.location = '{{base_url}}logout';
|
||||
})
|
||||
|
||||
$('#restart').click(function(){
|
||||
$('#loader_text').text("Bazarr is restarting, please wait...");
|
||||
$.ajax({
|
||||
url: "{{base_url}}restart",
|
||||
async: true
|
||||
})
|
||||
.done(function(){
|
||||
setTimeout(function(){ setInterval(ping, 2000); },8000);
|
||||
});
|
||||
})
|
||||
|
||||
% from get_settings import get_general_settings
|
||||
% ip = get_general_settings()[0]
|
||||
% port = get_general_settings()[1]
|
||||
% base_url = get_general_settings()[2]
|
||||
|
||||
if ("{{ip}}" == "0.0.0.0") {
|
||||
public_ip = window.location.hostname;
|
||||
} else {
|
||||
public_ip = "{{ip}}";
|
||||
}
|
||||
|
||||
protocol = window.location.protocol;
|
||||
|
||||
if (window.location.port == '{{current_port}}') {
|
||||
public_port = '{{port}}';
|
||||
} else {
|
||||
public_port = window.location.port;
|
||||
}
|
||||
|
||||
function ping() {
|
||||
$.ajax({
|
||||
url: protocol + '//' + public_ip + ':' + public_port + '{{base_url}}',
|
||||
success: function(result) {
|
||||
window.location.href= protocol + '//' + public_ip + ':' + public_port + '{{base_url}}';
|
||||
}
|
||||
});
|
||||
}
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
<script src="{{base_url}}static/semantic/semantic.min.js"></script>
|
||||
<script src="{{base_url}}static/jquery/tablesort.js"></script>
|
||||
<link rel="stylesheet" href="{{base_url}}static/semantic/semantic.min.css">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{base_url}}static/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{base_url}}static/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{base_url}}static/favicon-16x16.png">
|
||||
<link rel="manifest" href="{{base_url}}static/manifest.json">
|
||||
<link rel="mask-icon" href="{{base_url}}static/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="{{base_url}}static/favicon.ico">
|
||||
<meta name="msapplication-config" content="{{base_url}}static/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<title>System - Bazarr</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 1em;
|
||||
}
|
||||
#logs {
|
||||
margin-top: 4em;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; }
|
||||
.fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div id='loader_text' class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<div class="ui basic icon buttons" style="float: right;">
|
||||
<div id="shutdown" class="ui icon button" data-tooltip="Shutdown" data-inverted=""><i class="red power off icon"></i></div>
|
||||
<div id="restart" class="ui icon button" data-tooltip="Restart" data-inverted=""><i class="redo alternate icon"></i></div>
|
||||
% from get_settings import get_auth_settings
|
||||
% if get_auth_settings()[0] is not 'None':
|
||||
<div id="logout" class="ui icon button" data-tooltip="Logout" data-inverted=""><i class="sign-out icon"></i></div>
|
||||
% end
|
||||
</div>
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="tabs item active" data-tab="tasks">Tasks</a>
|
||||
<a class="tabs item" data-tab="logs">Logs</a>
|
||||
<a class="tabs item" data-tab="status">Status</a>
|
||||
<a class="tabs item" data-tab="releases">Releases</a>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment active" data-tab="tasks">
|
||||
<div class="content">
|
||||
<table class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Execution Frequency</th>
|
||||
<th>Next Execution</th>
|
||||
<th class="collapsing"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for task in task_list:
|
||||
<tr>
|
||||
<td>{{task[0]}}</td>
|
||||
<td>{{task[1]}}</td>
|
||||
<td>{{task[2]}}</td>
|
||||
<td class="collapsing">
|
||||
<div class="execute ui inverted basic compact icon" data-tooltip="Execute {{task[0]}}" data-inverted="" data-taskid='{{task[3]}}'>
|
||||
<i class="ui black refresh icon"></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="logs">
|
||||
<div class="ui left floated basic buttons">
|
||||
<button id="refresh_log" class="ui button"><i class="refresh icon"></i>Refresh current page</button>
|
||||
</div>
|
||||
<div class="ui right floated basic buttons">
|
||||
<button id="download_log" class="ui button"><i class="download icon"></i>Download log file</button>
|
||||
<button id="empty_log" class="ui button"><i class="download icon"></i>Empty log file</button>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div id="logs"></div>
|
||||
|
||||
%try: page_size
|
||||
%except NameError: page_size = "25"
|
||||
%end
|
||||
%if page_size != -1:
|
||||
<div class="ui grid">
|
||||
<div class="three column row">
|
||||
<div class="column"></div>
|
||||
<div class="center aligned column">
|
||||
<i class="fast backward icon"></i>
|
||||
<i class="backward icon"></i>
|
||||
<span id="page"></span> / {{max_page}}
|
||||
<i class="forward icon"></i>
|
||||
<i class="fast forward icon"></i>
|
||||
</div>
|
||||
<div class="right floated right aligned column">Total records: {{row_count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
%end
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="status">
|
||||
<div class="ui dividing header">About</div>
|
||||
<div class="twelve wide column">
|
||||
<div class="ui grid">
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Bazarr version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{bazarr_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% from get_settings import get_general_settings
|
||||
% if get_general_settings()[12]:
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Sonarr version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{sonarr_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% end
|
||||
% if get_general_settings()[13]:
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Radarr version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{radarr_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% end
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Operating system</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{operating_system}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Python version</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{python_version}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Bazarr directory</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{bazarr_dir}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Bazarr config directory</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
{{config_dir}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui dividing header">More info</div>
|
||||
<div class="twelve wide column">
|
||||
<div class="ui grid">
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Source</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
<i class="github icon"></i><a href="https://github.com/morpheus65535/bazarr" target="_blank">Bazarr on GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Wiki</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
<i class="wikipedia w icon"></i><a href="https://github.com/morpheus65535/bazarr/wiki" target="_blank">Bazarr Wiki</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Discord</label>
|
||||
</div>
|
||||
<div class="five wide column">
|
||||
<div class='field'>
|
||||
<div class="ui fluid input">
|
||||
<i class="discord icon"></i><a href="https://discord.gg/MH2e2eb" target="_blank">Bazarr on Discord</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui bottom attached tab segment" data-tab="releases">
|
||||
%for release in releases:
|
||||
<h2 class="ui header">
|
||||
%if release[0][1:] == bazarr_version:
|
||||
{{release[0]}} <div class="ui green label">Current version</div>
|
||||
%else:
|
||||
{{release[0]}}
|
||||
%end
|
||||
</h2>
|
||||
<div class="ui list">
|
||||
%release_lines = release[1].split('\r\n')
|
||||
%for i, release_line in enumerate(release_lines):
|
||||
%if i == 0:
|
||||
<div class="item">
|
||||
<div><h4>{{release_line}}</h4></div>
|
||||
<div class="list">
|
||||
%else:
|
||||
<div class="item">{{release_line}}</div>
|
||||
%end
|
||||
%end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
%end
|
||||
</div>
|
||||
</div>
|
||||
% include('footer.tpl')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
$('.menu .item')
|
||||
.tab();
|
||||
|
||||
function loadURL(page) {
|
||||
$.ajax({
|
||||
url: "{{base_url}}logs/" + page,
|
||||
beforeSend: function() { $('#loader').addClass('active'); },
|
||||
complete: function() { $('#loader').removeClass('active'); },
|
||||
cache: false
|
||||
}).done(function(data) {
|
||||
$("#logs").html(data);
|
||||
});
|
||||
|
||||
current_page = page;
|
||||
|
||||
$("#page").text(current_page);
|
||||
if (current_page == 1) {
|
||||
$(".backward, .fast.backward").addClass("disabled");
|
||||
}
|
||||
if (current_page == {{int(max_page)}}) {
|
||||
$(".forward, .fast.forward").addClass("disabled");
|
||||
}
|
||||
if (current_page > 1 && current_page < {{int(max_page)}}) {
|
||||
$(".backward, .fast.backward").removeClass("disabled");
|
||||
$(".forward, .fast.forward").removeClass("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
loadURL(1);
|
||||
|
||||
$('.backward').on('click', function(){
|
||||
loadURL(current_page - 1);
|
||||
});
|
||||
$('.fast.backward').on('click', function(){
|
||||
loadURL(1);
|
||||
});
|
||||
$('.forward').on('click', function(){
|
||||
loadURL(current_page + 1);
|
||||
});
|
||||
$('.fast.forward').on('click', function(){
|
||||
loadURL({{int(max_page)}});
|
||||
});
|
||||
|
||||
$('#refresh_log').on('click', function(){
|
||||
loadURL(current_page);
|
||||
});
|
||||
|
||||
$('#download_log').on('click', function(){
|
||||
window.location = '{{base_url}}bazarr.log';
|
||||
});
|
||||
|
||||
$('#empty_log').on('click', function(){
|
||||
window.location = '{{base_url}}emptylog';
|
||||
});
|
||||
|
||||
$('.execute').on('click', function(){
|
||||
window.location = '{{base_url}}execute/' + $(this).data("taskid");
|
||||
});
|
||||
|
||||
$('a:not(.tabs), button:not(.cancel, #download_log), #restart').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
});
|
||||
|
||||
$('a[target="_blank"]').on('click', function(){
|
||||
$('#loader').removeClass('active');
|
||||
});
|
||||
|
||||
$('#shutdown').on('click', function(){
|
||||
$.ajax({
|
||||
url: "{{base_url}}shutdown",
|
||||
async: false
|
||||
})
|
||||
.always(function(){
|
||||
document.open();
|
||||
document.write('Bazarr has shutdown.');
|
||||
document.close();
|
||||
});
|
||||
});
|
||||
|
||||
$('#logout').on('click', function(){
|
||||
window.location = '{{base_url}}logout';
|
||||
});
|
||||
|
||||
$('#restart').on('click', function(){
|
||||
$('#loader_text').text("Bazarr is restarting, please wait...");
|
||||
$.ajax({
|
||||
url: "{{base_url}}restart",
|
||||
async: true
|
||||
})
|
||||
.done(function(){
|
||||
setTimeout(function(){ setInterval(ping, 2000); },8000);
|
||||
})
|
||||
});
|
||||
|
||||
% from get_settings import get_general_settings
|
||||
% ip = get_general_settings()[0]
|
||||
% port = get_general_settings()[1]
|
||||
% base_url = get_general_settings()[2]
|
||||
|
||||
if ("{{ip}}" === "0.0.0.0") {
|
||||
public_ip = window.location.hostname;
|
||||
} else {
|
||||
public_ip = "{{ip}}";
|
||||
}
|
||||
|
||||
protocol = window.location.protocol;
|
||||
|
||||
if (window.location.port === '{{current_port}}') {
|
||||
public_port = '{{port}}';
|
||||
} else {
|
||||
public_port = window.location.port;
|
||||
}
|
||||
|
||||
function ping() {
|
||||
$.ajax({
|
||||
url: protocol + '//' + public_ip + ':' + public_port + '{{base_url}}',
|
||||
success: function(result) {
|
||||
window.location.href= protocol + '//' + public_ip + ':' + public_port + '{{base_url}}';
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -23,24 +23,12 @@
|
|||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 1em;
|
||||
}
|
||||
#logs {
|
||||
margin-top: 4em;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward {
|
||||
cursor: pointer;
|
||||
}
|
||||
.fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; }
|
||||
.fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; }
|
||||
.ui.tabular.menu > .disabled.item {
|
||||
opacity: 0.45 !important;
|
||||
pointer-events: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -50,13 +38,13 @@
|
|||
% import sqlite3
|
||||
% from get_settings import get_general_settings
|
||||
|
||||
%if get_general_settings()[24] is True:
|
||||
%if get_general_settings()[24]:
|
||||
% monitored_only_query_string = ' AND monitored = "True"'
|
||||
%else:
|
||||
% monitored_only_query_string = ""
|
||||
%end
|
||||
|
||||
% conn = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
||||
% conn = sqlite3.connect(os.path.join(config_dir, 'db', 'bazarr.db'), timeout=30)
|
||||
% c = conn.cursor()
|
||||
% wanted_series = c.execute("SELECT COUNT(*) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()
|
||||
% wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()
|
||||
|
@ -103,13 +91,13 @@
|
|||
.tab()
|
||||
;
|
||||
|
||||
$('#series_tab').click(function() {
|
||||
$('#series_tab').on('click', function() {
|
||||
loadURLseries(1);
|
||||
})
|
||||
});
|
||||
|
||||
$('#movies_tab').click(function() {
|
||||
$('#movies_tab').on('click', function() {
|
||||
loadURLmovies(1);
|
||||
})
|
||||
});
|
||||
|
||||
function loadURLseries(page) {
|
||||
$.ajax({
|
||||
|
@ -133,25 +121,25 @@
|
|||
});
|
||||
}
|
||||
|
||||
$('a:not(.tabs), button:not(.cancel, #download_log)').click(function(){
|
||||
$('a:not(.tabs), button:not(.cancel, #download_log)').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
if ($('#series_tab').data("enabled") == "True") {
|
||||
if ($('#series_tab').data("enabled") === "True") {
|
||||
$("#series_tab").removeClass('disabled');
|
||||
} else {
|
||||
$("#series_tab").addClass('disabled');
|
||||
}
|
||||
|
||||
if ($('#movies_tab').data("enabled") == "True") {
|
||||
if ($('#movies_tab').data("enabled") === "True") {
|
||||
$("#movies_tab").removeClass('disabled');
|
||||
} else {
|
||||
$("#movies_tab").addClass('disabled');
|
||||
}
|
||||
if ($('#series_tab').data("enabled") == "True") {
|
||||
if ($('#series_tab').data("enabled") === "True") {
|
||||
$( "#series_tab" ).trigger( "click" );
|
||||
}
|
||||
if ($('#series_tab').data("enabled") == "False" && $('#movies_tab').data("enabled") == "True") {
|
||||
if ($('#series_tab').data("enabled") === "False" && $('#movies_tab').data("enabled") === "True") {
|
||||
$( "#movies_tab" ).trigger( "click" );
|
||||
}
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -21,14 +21,6 @@
|
|||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em 3em 2em 3em;
|
||||
}
|
||||
#tablehistory {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
@ -83,12 +75,12 @@
|
|||
%>
|
||||
<a data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
%else:
|
||||
<a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top right" data-inverted="" data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search red icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search red icon"></i>
|
||||
</a>
|
||||
%end
|
||||
%end
|
||||
|
@ -96,7 +88,7 @@
|
|||
%else:
|
||||
<a data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
%end
|
||||
|
||||
|
@ -147,30 +139,30 @@
|
|||
|
||||
|
||||
<script>
|
||||
$('a, button').click(function(){
|
||||
$('a, button').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
$('.fast.backward').on('click', function(){
|
||||
loadURLmovies(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.backward:not(.fast)').on('click', function(){
|
||||
loadURLmovies({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.forward:not(.fast)').on('click', function(){
|
||||
loadURLmovies({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
});
|
||||
$('.fast.forward').on('click', function(){
|
||||
loadURLmovies({{int(max_page)}});
|
||||
})
|
||||
});
|
||||
|
||||
$('#wanted_search_missing_subtitles_movies').click(function(){
|
||||
$('#wanted_search_missing_subtitles_movies').on('click', function(){
|
||||
$('#loader_text').text("Searching for missing subtitles...");
|
||||
window.location = '{{base_url}}wanted_search_missing_subtitles';
|
||||
})
|
||||
});
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
var values = {
|
||||
$('.get_subtitle').on('click', function(){
|
||||
const values = {
|
||||
moviePath: $(this).attr("data-moviePath"),
|
||||
sceneName: $(this).attr("data-sceneName"),
|
||||
language: $(this).attr("data-language"),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -21,14 +21,6 @@
|
|||
body {
|
||||
background-color: #272727;
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em 3em 2em 3em;
|
||||
}
|
||||
#tablehistory {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
@ -90,12 +82,12 @@
|
|||
%>
|
||||
<a data-episodePath="{{row[5]}}" data-sceneName="{{row[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[6]}}" data-sonarrSeriesId={{row[4]}} data-sonarrEpisodeId={{row[7]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
%else:
|
||||
<a data-tooltip="Automatic searching delayed (adaptive search)" data-position="top right" data-inverted="" data-episodePath="{{row[5]}}" data-sceneName="{{row[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[6]}}" data-sonarrSeriesId={{row[4]}} data-sonarrEpisodeId={{row[7]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search red icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search red icon"></i>
|
||||
</a>
|
||||
%end
|
||||
%end
|
||||
|
@ -103,7 +95,7 @@
|
|||
%else:
|
||||
<a data-episodePath="{{row[5]}}" data-sceneName="{{row[8]}}" data-language="{{alpha3_from_alpha2(str(language))}}" data-hi="{{row[6]}}" data-sonarrSeriesId={{row[4]}} data-sonarrEpisodeId={{row[7]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
<i style="margin-left:3px; margin-right:0" class="search icon"></i>
|
||||
</a>
|
||||
%end
|
||||
|
||||
|
@ -154,30 +146,30 @@
|
|||
|
||||
|
||||
<script>
|
||||
$('a, button').click(function(){
|
||||
$('a, button').on('click', function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
$('.fast.backward').on('click', function(){
|
||||
loadURLseries(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.backward:not(.fast)').on('click', function(){
|
||||
loadURLseries({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
});
|
||||
$('.forward:not(.fast)').on('click', function(){
|
||||
loadURLseries({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
});
|
||||
$('.fast.forward').on('click', function(){
|
||||
loadURLseries({{int(max_page)}});
|
||||
})
|
||||
});
|
||||
|
||||
$('#wanted_search_missing_subtitles').click(function(){
|
||||
$('#wanted_search_missing_subtitles').on('click', function(){
|
||||
$('#loader_text').text("Searching for missing subtitles...");
|
||||
window.location = '{{base_url}}wanted_search_missing_subtitles';
|
||||
})
|
||||
});
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
var values = {
|
||||
$('.get_subtitle').on('click', function(){
|
||||
const values = {
|
||||
episodePath: $(this).attr("data-episodePath"),
|
||||
sceneName: $(this).attr("data-sceneName"),
|
||||
language: $(this).attr("data-language"),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||||
|
@ -24,8 +24,8 @@
|
|||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
border-radius: 0px;
|
||||
box-shadow: 0px 0px 5px 5px #ffffff;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 5px 5px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding: 1em;
|
||||
|
@ -791,9 +791,9 @@
|
|||
</html>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(function() {
|
||||
|
||||
$('.next1').click(function(e) {
|
||||
$('.next1').on('click', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -805,7 +805,7 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
|
||||
$('.prev1').click(function(m) {
|
||||
$('.prev1').on('click', function(m) {
|
||||
|
||||
m.preventDefault();
|
||||
|
||||
|
@ -817,7 +817,7 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
|
||||
$('.next2').click(function(e) {
|
||||
$('.next2').on('click', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -829,7 +829,7 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
|
||||
$('.prev2').click(function(m) {
|
||||
$('.prev2').on('click', function(m) {
|
||||
|
||||
m.preventDefault();
|
||||
|
||||
|
@ -841,7 +841,7 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
|
||||
$('.next3').click(function(e) {
|
||||
$('.next3').on('click', function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -853,7 +853,7 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
|
||||
$('.prev3').click(function(m) {
|
||||
$('.prev3').on('click', function(m) {
|
||||
|
||||
m.preventDefault();
|
||||
|
||||
|
@ -866,9 +866,7 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(".sonarr_hide").hide();
|
||||
$('#settings_use_sonarr').checkbox({
|
||||
onChecked: function() {
|
||||
|
@ -889,19 +887,19 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#sonarr_ssl_div').data("ssl") == "True") {
|
||||
if ($('#sonarr_ssl_div').data("ssl") === "True") {
|
||||
$("#sonarr_ssl_div").checkbox('check');
|
||||
} else {
|
||||
$("#sonarr_ssl_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#radarr_ssl_div').data("ssl") == "True") {
|
||||
if ($('#radarr_ssl_div').data("ssl") === "True") {
|
||||
$("#radarr_ssl_div").checkbox('check');
|
||||
} else {
|
||||
$("#radarr_ssl_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_single_language').data("single-language") == "True") {
|
||||
if ($('#settings_single_language').data("single-language") === "True") {
|
||||
$("#settings_single_language").checkbox('check');
|
||||
} else {
|
||||
$("#settings_single_language").checkbox('uncheck');
|
||||
|
@ -910,13 +908,13 @@ $(document).ready(function() {
|
|||
$('#settings_languages').dropdown('setting', 'onAdd', function(val, txt){
|
||||
$("#settings_serie_default_languages").append(
|
||||
$("<option></option>").attr("value", val).text(txt)
|
||||
)
|
||||
);
|
||||
$("#settings_movie_default_languages").append(
|
||||
$("<option></option>").attr("value", val).text(txt)
|
||||
)
|
||||
});
|
||||
|
||||
$('#settings_languages').dropdown('setting', 'onRemove', function(val, txt){
|
||||
$('#settings_languages').dropdown('setting', 'onRemove', function(val){
|
||||
$("#settings_serie_default_languages").dropdown('remove selected', val);
|
||||
$("#settings_serie_default_languages option[value='" + val + "']").remove();
|
||||
|
||||
|
@ -924,13 +922,13 @@ $(document).ready(function() {
|
|||
$("#settings_movie_default_languages option[value='" + val + "']").remove();
|
||||
});
|
||||
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_serie_default_enabled_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_serie_default_enabled_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_serie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_serie_default_languages").removeClass('disabled');
|
||||
$("#settings_serie_default_hi_div").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -949,19 +947,19 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#settings_serie_default_hi_div').data("hi") == "True") {
|
||||
if ($('#settings_serie_default_hi_div').data("hi") === "True") {
|
||||
$("#settings_serie_default_hi_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_serie_default_hi_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_movie_default_enabled_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_movie_default_enabled_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") == "True") {
|
||||
if ($('#settings_movie_default_enabled_div').data("enabled") === "True") {
|
||||
$("#settings_movie_default_languages").removeClass('disabled');
|
||||
$("#settings_movie_default_hi_div").removeClass('disabled');
|
||||
} else {
|
||||
|
@ -980,7 +978,7 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
if ($('#settings_movie_default_hi_div').data("hi") == "True") {
|
||||
if ($('#settings_movie_default_hi_div').data("hi") === "True") {
|
||||
$("#settings_movie_default_hi_div").checkbox('check');
|
||||
} else {
|
||||
$("#settings_movie_default_hi_div").checkbox('uncheck');
|
||||
|
@ -998,7 +996,7 @@ $(document).ready(function() {
|
|||
$("#settings_movie_default_languages").attr('multiple');
|
||||
}
|
||||
|
||||
$("#settings_single_language").change(function(i, obj) {
|
||||
$("#settings_single_language").on('change', function() {
|
||||
if ($("#settings_single_language").checkbox('is checked')) {
|
||||
$("#settings_serie_default_languages").dropdown('clear');
|
||||
$("#settings_movie_default_languages").dropdown('clear');
|
||||
|
@ -1035,9 +1033,7 @@ $(document).ready(function() {
|
|||
%if settings_general[19] is not None:
|
||||
$('#settings_movie_default_languages').dropdown('set selected',{{!settings_general[19]}});
|
||||
%end
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// form validation
|
||||
$('#wizard_form')
|
||||
.form({
|
||||
|
@ -1179,7 +1175,6 @@ $(document).ready(function() {
|
|||
$('.prev3').removeClass('disabled');
|
||||
$('.next2').removeClass('disabled');
|
||||
$('.next3').removeClass('disabled');
|
||||
$('#loader').addClass('active');
|
||||
}
|
||||
})
|
||||
;
|
||||
|
@ -1191,18 +1186,18 @@ $(document).ready(function() {
|
|||
$('.form').form('validate field', 'settings_subliminal_languages');
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
$(function() {
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
});
|
||||
|
||||
$('#wizard_form').focusout(function() {
|
||||
$('#wizard_form').on('focusout', function() {
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$('#sonarr_validate').click(function() {
|
||||
$('#sonarr_validate').on('click', function() {
|
||||
if ($('#sonarr_ssl_div').checkbox('is checked')) {
|
||||
protocol = 'https';
|
||||
} else {
|
||||
|
@ -1223,25 +1218,25 @@ $(document).ready(function() {
|
|||
$('#loader').removeClass('active');
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('.sonarr_config').keyup(function() {
|
||||
$('.sonarr_config').on('keyup', function() {
|
||||
$('#sonarr_validated').checkbox('uncheck');
|
||||
$('#sonarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('#settings_sonarr_ssl').change(function() {
|
||||
$('#settings_sonarr_ssl').on('change', function() {
|
||||
$('#sonarr_validated').checkbox('uncheck');
|
||||
$('#sonarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$("#sonarr_validated").checkbox('check');
|
||||
|
||||
$('#radarr_validate').click(function() {
|
||||
$('#radarr_validate').on('click', function() {
|
||||
if ($('#radarr_ssl_div').checkbox('is checked')) {
|
||||
protocol = 'https';
|
||||
} else {
|
||||
|
@ -1262,21 +1257,21 @@ $(document).ready(function() {
|
|||
$('#loader').removeClass('active');
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
$('.radarr_config').keyup(function() {
|
||||
$('.radarr_config').on('keyup', function() {
|
||||
$('#radarr_validated').checkbox('uncheck');
|
||||
$('#radarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$('#settings_radarr_ssl').change(function() {
|
||||
$('#settings_radarr_ssl').on('change', function() {
|
||||
$('#radarr_validated').checkbox('uncheck');
|
||||
$('#radarr_validation_result').text('You must test your Sonarr connection settings before saving settings.').css('color', 'red');
|
||||
$('.form').form('validate form');
|
||||
$('#loader').removeClass('active');
|
||||
})
|
||||
});
|
||||
|
||||
$("#radarr_validated").checkbox('check');
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue