# Conflicts: # bazarr/get_movies.py # bazarr/list_subtitles.py # bazarr/main.pypull/292/head
commit
536f0196c0
File diff suppressed because one or more lines are too long
@ -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,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>
|
Loading…
Reference in new issue