mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-01 12:32:25 +08:00
Continuing update development
This commit is contained in:
parent
c0ce5362ea
commit
4e50a655aa
9 changed files with 172 additions and 143 deletions
50
bazarr.py
50
bazarr.py
|
@ -26,6 +26,7 @@ from get_series import *
|
|||
from get_episodes import *
|
||||
from get_general_settings import *
|
||||
from get_sonarr_settings import *
|
||||
from check_update import *
|
||||
from list_subtitles import *
|
||||
from get_subtitle import *
|
||||
from utils import *
|
||||
|
@ -69,11 +70,15 @@ def configure_logging():
|
|||
|
||||
configure_logging()
|
||||
|
||||
@route(base_url + '/static/:path#.+#', name='static')
|
||||
@route('/')
|
||||
def redirect_root():
|
||||
redirect (base_url)
|
||||
|
||||
@route(base_url + 'static/:path#.+#', name='static')
|
||||
def static(path):
|
||||
return static_file(path, root=os.path.join(os.path.dirname(__file__), 'static'))
|
||||
|
||||
@route(base_url + '/image_proxy/<url:path>', method='GET')
|
||||
@route(base_url + 'image_proxy/<url:path>', method='GET')
|
||||
def image_proxy(url):
|
||||
img_pil = Image.open(BytesIO(requests.get(url_sonarr_short + '/' + url).content))
|
||||
img_buffer = BytesIO()
|
||||
|
@ -82,7 +87,7 @@ def image_proxy(url):
|
|||
img_buffer.seek(0)
|
||||
return send_file(img_buffer, ctype=img_pil.format)
|
||||
|
||||
@route(base_url + '/')
|
||||
@route(base_url)
|
||||
def series():
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
db.create_function("path_substitution", 1, path_replace)
|
||||
|
@ -95,7 +100,7 @@ def series():
|
|||
output = template('series', rows=data, languages=languages, base_url=base_url)
|
||||
return output
|
||||
|
||||
@route(base_url + '/edit_series/<no:int>', method='POST')
|
||||
@route(base_url + 'edit_series/<no:int>', method='POST')
|
||||
def edit_series(no):
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -124,7 +129,7 @@ def edit_series(no):
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/update_series')
|
||||
@route(base_url + 'update_series')
|
||||
def update_series_list():
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -132,7 +137,7 @@ def update_series_list():
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/update_all_episodes')
|
||||
@route(base_url + 'update_all_episodes')
|
||||
def update_all_episodes_list():
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -140,7 +145,7 @@ def update_all_episodes_list():
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/add_new_episodes')
|
||||
@route(base_url + 'add_new_episodes')
|
||||
def add_new_episodes_list():
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -148,7 +153,7 @@ def add_new_episodes_list():
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/episodes/<no:int>', method='GET')
|
||||
@route(base_url + 'episodes/<no:int>', method='GET')
|
||||
def episodes(no):
|
||||
conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
conn.create_function("path_substitution", 1, path_replace)
|
||||
|
@ -166,7 +171,7 @@ def episodes(no):
|
|||
|
||||
return template('episodes', no=no, details=series_details, seasons=seasons_list, url_sonarr_short=url_sonarr_short, base_url=base_url)
|
||||
|
||||
@route(base_url + '/scan_disk/<no:int>', method='GET')
|
||||
@route(base_url + 'scan_disk/<no:int>', method='GET')
|
||||
def scan_disk(no):
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -174,7 +179,7 @@ def scan_disk(no):
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/search_missing_subtitles/<no:int>', method='GET')
|
||||
@route(base_url + 'search_missing_subtitles/<no:int>', method='GET')
|
||||
def search_missing_subtitles(no):
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -182,7 +187,7 @@ def search_missing_subtitles(no):
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/history')
|
||||
@route(base_url + 'history')
|
||||
def history():
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
c = db.cursor()
|
||||
|
@ -202,7 +207,7 @@ def history():
|
|||
c.close()
|
||||
return template('history', rows=data, row_count=row_count, page=page, max_page=max_page, base_url=base_url)
|
||||
|
||||
@route(base_url + '/wanted')
|
||||
@route(base_url + 'wanted')
|
||||
def wanted():
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
db.create_function("path_substitution", 1, path_replace)
|
||||
|
@ -222,7 +227,7 @@ def wanted():
|
|||
c.close()
|
||||
return template('wanted', rows=data, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url)
|
||||
|
||||
@route(base_url + '/wanted_search_missing_subtitles')
|
||||
@route(base_url + 'wanted_search_missing_subtitles')
|
||||
def wanted_search_missing_subtitles_list():
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -230,7 +235,7 @@ def wanted_search_missing_subtitles_list():
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/settings')
|
||||
@route(base_url + 'settings')
|
||||
def settings():
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
c = db.cursor()
|
||||
|
@ -245,7 +250,7 @@ def settings():
|
|||
c.close()
|
||||
return template('settings', settings_general=settings_general, settings_languages=settings_languages, settings_providers=settings_providers, settings_sonarr=settings_sonarr, base_url=base_url)
|
||||
|
||||
@route(base_url + '/save_settings', method='POST')
|
||||
@route(base_url + 'save_settings', method='POST')
|
||||
def save_settings():
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
@ -293,7 +298,16 @@ def save_settings():
|
|||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + '/system')
|
||||
@route(base_url + 'check_update')
|
||||
def check_update():
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
logging.info('test')
|
||||
check_and_apply_update()
|
||||
|
||||
redirect(ref)
|
||||
|
||||
@route(base_url + 'system')
|
||||
def system():
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
c = db.cursor()
|
||||
|
@ -311,7 +325,7 @@ def system():
|
|||
|
||||
return template('system', tasks=tasks, logs=logs, base_url=base_url, task_list=task_list)
|
||||
|
||||
@route(base_url + '/remove_subtitles', method='POST')
|
||||
@route(base_url + 'remove_subtitles', method='POST')
|
||||
def remove_subtitles():
|
||||
episodePath = request.forms.get('episodePath')
|
||||
language = request.forms.get('language')
|
||||
|
@ -328,7 +342,7 @@ def remove_subtitles():
|
|||
store_subtitles(episodePath)
|
||||
list_missing_subtitles(sonarrSeriesId)
|
||||
|
||||
@route(base_url + '/get_subtitle', method='POST')
|
||||
@route(base_url + 'get_subtitle', method='POST')
|
||||
def get_subtitle():
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
|
|
|
@ -4,8 +4,10 @@ import os
|
|||
import subprocess
|
||||
|
||||
def check_and_apply_update():
|
||||
result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT, shell=True, cwd=os.path.join(os.path.dirname(__file__)).split('\n')
|
||||
result = subprocess.check_output(["git", "pull", '--dry-run', 'origin', branch], stderr=subprocess.STDOUT, shell=True, cwd=os.path.join(os.path.dirname(__file__))).split('\n')
|
||||
|
||||
if result[2] is not '':
|
||||
subprocess.check_output(["git", "pull", 'origin', branch], shell=True, cwd=os.path.join(os.path.dirname(__file__))
|
||||
subprocess.check_output(["git", "pull", 'origin', branch], shell=True, cwd=os.path.join(os.path.dirname(__file__)))
|
||||
os.execlp('python', 'python ' + os.path.join(os.path.dirname(__file__), 'bazarr.py'))
|
||||
|
||||
return result
|
||||
|
|
|
@ -16,8 +16,8 @@ db.close()
|
|||
ip = general_settings[0]
|
||||
port = general_settings[1]
|
||||
base_url = general_settings[2]
|
||||
if base_url.endswith('/'):
|
||||
base_url = base_url[:-1]
|
||||
if base_url == (''):
|
||||
base_url = '/'
|
||||
if general_settings[3] is None:
|
||||
path_mappings = []
|
||||
else:
|
||||
|
@ -50,4 +50,4 @@ def path_replace_reverse(path):
|
|||
if '\\' in path:
|
||||
path = path.replace('\\', '/')
|
||||
|
||||
return path
|
||||
return path
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<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">
|
||||
<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">
|
||||
<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>{{details[0]}} - Bazarr</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #1b1c1d;
|
||||
background-image: url("{{base_url}}/image_proxy{{details[3]}}");
|
||||
background-image: url("{{base_url}}image_proxy{{details[3]}}");
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
|
@ -76,31 +76,31 @@
|
|||
%import ast
|
||||
%import pycountry
|
||||
%from get_general_settings import *
|
||||
<div style="display: none;"><img src="{{base_url}}/image_proxy{{details[3]}}"></div>
|
||||
<div style="display: none;"><img src="{{base_url}}image_proxy{{details[3]}}"></div>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
<div id="divmenu" class="ui container">
|
||||
<div style="background-color:#272727;" class="ui inverted borderless labeled icon huge menu five item">
|
||||
<a href="{{base_url}}/"><img style="margin-right:32px;" class="logo" src="{{base_url}}/static/logo128.png"></a>
|
||||
<a href="{{base_url}}"><img style="margin-right:32px;" class="logo" src="{{base_url}}static/logo128.png"></a>
|
||||
<div style="height:80px;" class="ui container">
|
||||
<a class="item" href="{{base_url}}/">
|
||||
<a class="item" href="{{base_url}}">
|
||||
<i class="play icon"></i>
|
||||
Series
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/history">
|
||||
<a class="item" href="{{base_url}}history">
|
||||
<i class="wait icon"></i>
|
||||
History
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/wanted">
|
||||
<a class="item" href="{{base_url}}wanted">
|
||||
<i class="warning sign icon"></i>
|
||||
Wanted
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/settings">
|
||||
<a class="item" href="{{base_url}}settings">
|
||||
<i class="settings icon"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/system">
|
||||
<a class="item" href="{{base_url}}system">
|
||||
<i class="laptop icon"></i>
|
||||
System
|
||||
</a>
|
||||
|
@ -110,7 +110,7 @@
|
|||
|
||||
<div style='padding-left: 2em; padding-right: 2em;' class='ui container'>
|
||||
<div id="divdetails" class="ui container">
|
||||
<img class="left floated ui image" src="{{base_url}}/image_proxy{{details[2]}}">
|
||||
<img class="left floated ui image" src="{{base_url}}image_proxy{{details[2]}}">
|
||||
<div class="ui right floated inverted basic buttons">
|
||||
<button id="scan_disk" class="ui button"><i class="refresh icon"></i>Scan disk for subtitles</button>
|
||||
<button id="search_missing_subtitles" class="ui button"><i class="download icon"></i>Download missing subtitles</button>
|
||||
|
@ -201,11 +201,11 @@
|
|||
|
||||
<script>
|
||||
$('#scan_disk').click(function(){
|
||||
window.location = '{{base_url}}/scan_disk/{{no}}';
|
||||
window.location = '{{base_url}}scan_disk/{{no}}';
|
||||
})
|
||||
|
||||
$('#search_missing_subtitles').click(function(){
|
||||
window.location = '{{base_url}}/search_missing_subtitles/{{no}}';
|
||||
window.location = '{{base_url}}search_missing_subtitles/{{no}}';
|
||||
})
|
||||
|
||||
$('.remove_subtitles').click(function(){
|
||||
|
@ -217,7 +217,7 @@
|
|||
sonarrEpisodeId: $(this).attr("data-sonarrEpisodeId")
|
||||
};
|
||||
$.ajax({
|
||||
url: "{{base_url}}/remove_subtitles",
|
||||
url: "{{base_url}}remove_subtitles",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: values
|
||||
|
@ -234,7 +234,7 @@
|
|||
sonarrEpisodeId: $(this).attr("data-sonarrEpisodeId")
|
||||
};
|
||||
$.ajax({
|
||||
url: "{{base_url}}/get_subtitle",
|
||||
url: "{{base_url}}get_subtitle",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: values
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<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">
|
||||
<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">
|
||||
<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>History - Bazarr</title>
|
||||
|
@ -48,25 +48,25 @@
|
|||
</div>
|
||||
<div id="divmenu" class="ui container">
|
||||
<div style="background-color:#272727;" class="ui inverted borderless labeled icon huge menu five item">
|
||||
<a href="{{base_url}}/"><img style="margin-right:32px;" class="logo" src="{{base_url}}/static/logo128.png"></a>
|
||||
<a href="{{base_url}}"><img style="margin-right:32px;" class="logo" src="{{base_url}}static/logo128.png"></a>
|
||||
<div style="height:80px;" class="ui container">
|
||||
<a class="item" href="{{base_url}}/">
|
||||
<a class="item" href="{{base_url}}">
|
||||
<i class="play icon"></i>
|
||||
Series
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/history">
|
||||
<a class="item" href="{{base_url}}history">
|
||||
<i class="wait icon"></i>
|
||||
History
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/wanted">
|
||||
<a class="item" href="{{base_url}}wanted">
|
||||
<i class="warning sign icon"></i>
|
||||
Wanted
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/settings">
|
||||
<a class="item" href="{{base_url}}settings">
|
||||
<i class="settings icon"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/system">
|
||||
<a class="item" href="{{base_url}}system">
|
||||
<i class="laptop icon"></i>
|
||||
System
|
||||
</a>
|
||||
|
@ -102,7 +102,7 @@
|
|||
</div>
|
||||
%end
|
||||
</td>
|
||||
<td><a href="{{base_url}}/episodes/{{row[6]}}">{{row[1]}}</a></td>
|
||||
<td><a href="{{base_url}}episodes/{{row[6]}}">{{row[1]}}</a></td>
|
||||
<td class="collapsing">
|
||||
<%episode = row[2].split('x')%>
|
||||
{{episode[0] + 'x' + episode[1].zfill(2)}}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<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">
|
||||
<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">
|
||||
<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>Bazarr</title>
|
||||
|
@ -51,25 +51,25 @@
|
|||
</div>
|
||||
<div id="divmenu" class="ui container">
|
||||
<div style="background-color:#272727;" class="ui inverted borderless labeled icon huge menu five item">
|
||||
<a href="{{base_url}}/"><img style="margin-right:32px;" class="logo" src="{{base_url}}/static/logo128.png"></a>
|
||||
<a href="{{base_url}}"><img style="margin-right:32px;" class="logo" src="{{base_url}}static/logo128.png"></a>
|
||||
<div style="height:80px;" class="ui container">
|
||||
<a class="item" href="{{base_url}}/">
|
||||
<a class="item" href="{{base_url}}">
|
||||
<i class="play icon"></i>
|
||||
Series
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/history">
|
||||
<a class="item" href="{{base_url}}history">
|
||||
<i class="wait icon"></i>
|
||||
History
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/wanted">
|
||||
<a class="item" href="{{base_url}}wanted">
|
||||
<i class="warning sign icon"></i>
|
||||
Wanted
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/settings">
|
||||
<a class="item" href="{{base_url}}settings">
|
||||
<i class="settings icon"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/system">
|
||||
<a class="item" href="{{base_url}}system">
|
||||
<i class="laptop icon"></i>
|
||||
System
|
||||
</a>
|
||||
|
@ -99,7 +99,7 @@
|
|||
%import os
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td><a href="{{base_url}}/episodes/{{row[5]}}">{{row[1]}}</a></td>
|
||||
<td><a href="{{base_url}}episodes/{{row[5]}}">{{row[1]}}</a></td>
|
||||
<td>
|
||||
{{row[2]}}
|
||||
</td>
|
||||
|
@ -201,24 +201,24 @@
|
|||
;
|
||||
|
||||
$('#update_series').click(function(){
|
||||
window.location = '{{base_url}}/update_series';
|
||||
window.location = '{{base_url}}update_series';
|
||||
})
|
||||
|
||||
$('#update_all_episodes').click(function(){
|
||||
window.location = '{{base_url}}/update_all_episodes';
|
||||
window.location = '{{base_url}}update_all_episodes';
|
||||
})
|
||||
|
||||
$('#add_new_episodes').click(function(){
|
||||
window.location = '{{base_url}}/add_new_episodes';
|
||||
window.location = '{{base_url}}add_new_episodes';
|
||||
})
|
||||
|
||||
$('.config').click(function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#series_form').attr('action', '{{base_url}}/edit_series/' + $(this).data("tvdbid"));
|
||||
$('#series_form').attr('action', '{{base_url}}edit_series/' + $(this).data("tvdbid"));
|
||||
|
||||
$("#series_title").html($(this).data("title"));
|
||||
$("#series_poster").attr("src", "{{base_url}}/image_proxy" + $(this).data("poster"));
|
||||
$("#series_poster").attr("src", "{{base_url}}image_proxy" + $(this).data("poster"));
|
||||
|
||||
$('#series_languages').dropdown('clear');
|
||||
var languages_array = eval($(this).data("languages"));
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<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">
|
||||
<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">
|
||||
<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>Settings - Bazarr</title>
|
||||
|
@ -45,25 +45,25 @@
|
|||
</div>
|
||||
<div id="divmenu" class="ui container">
|
||||
<div style="background-color:#272727;" class="ui inverted borderless labeled icon huge menu five item">
|
||||
<a href="{{base_url}}/"><img style="margin-right:32px;" class="logo" src="{{base_url}}/static/logo128.png"></a>
|
||||
<a href="{{base_url}}"><img style="margin-right:32px;" class="logo" src="{{base_url}}static/logo128.png"></a>
|
||||
<div style="height:80px;" class="ui container">
|
||||
<a class="item" href="{{base_url}}/">
|
||||
<a class="item" href="{{base_url}}">
|
||||
<i class="play icon"></i>
|
||||
Series
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/history">
|
||||
<a class="item" href="{{base_url}}history">
|
||||
<i class="wait icon"></i>
|
||||
History
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/wanted">
|
||||
<a class="item" href="{{base_url}}wanted">
|
||||
<i class="warning sign icon"></i>
|
||||
Wanted
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/settings">
|
||||
<a class="item" href="{{base_url}}settings">
|
||||
<i class="settings icon"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/system">
|
||||
<a class="item" href="{{base_url}}system">
|
||||
<i class="laptop icon"></i>
|
||||
System
|
||||
</a>
|
||||
|
@ -72,7 +72,7 @@
|
|||
</div>
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<form name="settings_form" id="settings_form" action="{{base_url}}/save_settings" method="post" class="ui form">
|
||||
<form name="settings_form" id="settings_form" action="{{base_url}}save_settings" method="post" class="ui form">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="tabs item active" data-tab="general">General</a>
|
||||
<a class="tabs item" data-tab="sonarr">Sonarr</a>
|
||||
|
@ -230,6 +230,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="middle aligned row">
|
||||
<div class="right aligned four wide column">
|
||||
<label>Manual update</label>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
<button id="settings_general_check_update" class="ui blue button">Check now and update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -362,6 +371,10 @@
|
|||
.tab()
|
||||
;
|
||||
|
||||
$('#settings_general_check_update').click(function(){
|
||||
window.location.href = '{{base_url}}check_update';
|
||||
})
|
||||
|
||||
$('a:not(.tabs), button:not(.cancel)').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<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">
|
||||
<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">
|
||||
<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>
|
||||
|
@ -45,25 +45,25 @@
|
|||
</div>
|
||||
<div id="divmenu" class="ui container">
|
||||
<div style="background-color:#272727;" class="ui inverted borderless labeled icon huge menu five item">
|
||||
<a href="{{base_url}}/"><img style="margin-right:32px;" class="logo" src="{{base_url}}/static/logo128.png"></a>
|
||||
<a href="{{base_url}}"><img style="margin-right:32px;" class="logo" src="{{base_url}}static/logo128.png"></a>
|
||||
<div style="height:80px;" class="ui container">
|
||||
<a class="item" href="{{base_url}}/">
|
||||
<a class="item" href="{{base_url}}">
|
||||
<i class="play icon"></i>
|
||||
Series
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/history">
|
||||
<a class="item" href="{{base_url}}history">
|
||||
<i class="wait icon"></i>
|
||||
History
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/wanted">
|
||||
<a class="item" href="{{base_url}}wanted">
|
||||
<i class="warning sign icon"></i>
|
||||
Wanted
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/settings">
|
||||
<a class="item" href="{{base_url}}settings">
|
||||
<i class="settings icon"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/system">
|
||||
<a class="item" href="{{base_url}}system">
|
||||
<i class="laptop icon"></i>
|
||||
System
|
||||
</a>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<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">
|
||||
<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">
|
||||
<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>Wanted - Bazarr</title>
|
||||
|
@ -53,25 +53,25 @@
|
|||
</div>
|
||||
<div id="divmenu" class="ui container">
|
||||
<div style="background-color:#272727;" class="ui inverted borderless labeled icon huge menu five item">
|
||||
<a href="{{base_url}}/"><img style="margin-right:32px;" class="logo" src="{{base_url}}/static/logo128.png"></a>
|
||||
<a href="{{base_url}}"><img style="margin-right:32px;" class="logo" src="{{base_url}}static/logo128.png"></a>
|
||||
<div style="height:80px;" class="ui container">
|
||||
<a class="item" href="{{base_url}}/">
|
||||
<a class="item" href="{{base_url}}">
|
||||
<i class="play icon"></i>
|
||||
Series
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/history">
|
||||
<a class="item" href="{{base_url}}history">
|
||||
<i class="wait icon"></i>
|
||||
History
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/wanted">
|
||||
<a class="item" href="{{base_url}}wanted">
|
||||
<i class="warning sign icon"></i>
|
||||
Wanted
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/settings">
|
||||
<a class="item" href="{{base_url}}settings">
|
||||
<i class="settings icon"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="item" href="{{base_url}}/system">
|
||||
<a class="item" href="{{base_url}}system">
|
||||
<i class="laptop icon"></i>
|
||||
System
|
||||
</a>
|
||||
|
@ -97,7 +97,7 @@
|
|||
%import pretty
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td><a href="{{base_url}}/episodes/{{row[4]}}">{{row[0]}}</a></td>
|
||||
<td><a href="{{base_url}}episodes/{{row[4]}}">{{row[0]}}</a></td>
|
||||
<td class="collapsing">
|
||||
<%episode = row[1].split('x')%>
|
||||
{{episode[0] + 'x' + episode[1].zfill(2)}}
|
||||
|
@ -171,7 +171,7 @@
|
|||
})
|
||||
|
||||
$('#wanted_search_missing_subtitles').click(function(){
|
||||
window.location = '{{base_url}}/wanted_search_missing_subtitles';
|
||||
window.location = '{{base_url}}wanted_search_missing_subtitles';
|
||||
})
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
|
@ -183,7 +183,7 @@
|
|||
sonarrEpisodeId: $(this).attr("data-sonarrEpisodeId")
|
||||
};
|
||||
$.ajax({
|
||||
url: "{{base_url}}/get_subtitle",
|
||||
url: "{{base_url}}get_subtitle",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: values
|
||||
|
|
Loading…
Reference in a new issue