mirror of https://github.com/morpheus65535/bazarr
548 lines
24 KiB
HTML
548 lines
24 KiB
HTML
|
<!doctype html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>{% block title %} {% endblock %}</title>
|
||
|
|
||
|
{% block head_meta %}
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||
|
<meta name="mobile-web-app-capable" content="yes"/>
|
||
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||
|
|
||
|
<link rel="apple-touch-icon" sizes="120x120" href="{{ url_for('static',filename='apple-touch-icon.png') }}">
|
||
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static',filename='favicon-32x32.png') }}">
|
||
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static',filename='favicon-16x16.png') }}">
|
||
|
<link rel="manifest" href="{{ url_for('static',filename='manifest.json') }}">
|
||
|
<link rel="mask-icon" href="{{ url_for('static',filename='safari-pinned-tab.svg') }}" color="#5bbad5">
|
||
|
<link rel="shortcut icon" href="{{ url_for('static',filename='favicon.ico') }}">
|
||
|
<meta name="msapplication-config" content="{{ url_for('static',filename='browserconfig.xml') }}">
|
||
|
<meta name="theme-color" content="#ffffff">
|
||
|
|
||
|
{% endblock head_meta %}
|
||
|
|
||
|
{% block head_css %}
|
||
|
<link href="{{ url_for('static',filename='noty/noty.css') }}" rel="stylesheet">
|
||
|
<link href="{{ url_for('static',filename='semantic/semantic.min.css') }}" rel="stylesheet">
|
||
|
|
||
|
<style>
|
||
|
#divmenu {
|
||
|
padding-top: 1em;
|
||
|
}
|
||
|
|
||
|
.menu_segment {
|
||
|
padding: 0em !important;
|
||
|
border: none !important;
|
||
|
margin: 0em !important;
|
||
|
background: none !important;
|
||
|
}
|
||
|
|
||
|
#icon_menu {
|
||
|
background: transparent !important;
|
||
|
border: solid;
|
||
|
border-width: 1px;
|
||
|
border-color: white;
|
||
|
}
|
||
|
|
||
|
.prompt {
|
||
|
background-color: #333333 !important;
|
||
|
color: white !important;
|
||
|
border-radius: 3px !important;
|
||
|
}
|
||
|
|
||
|
.searchicon {
|
||
|
color: white !important;
|
||
|
}
|
||
|
|
||
|
.ui.progress .bar > .progress {
|
||
|
right: auto;
|
||
|
left: .5em;
|
||
|
color: black !important;
|
||
|
}
|
||
|
|
||
|
.ui.disabled.progress.notification_progress {
|
||
|
opacity: unset !important;
|
||
|
}
|
||
|
|
||
|
div.disabled {
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
|
||
|
button.disabled {
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
|
||
|
@media only screen and (max-width: 1024px) {
|
||
|
.logo {
|
||
|
width: 36px;
|
||
|
height: auto;
|
||
|
}
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
{% endblock head_css %}
|
||
|
|
||
|
{% block head %}
|
||
|
{% endblock head %}
|
||
|
|
||
|
{% block head_tail %}
|
||
|
{% endblock head_tail %}
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
{% block page_body %}
|
||
|
<div id="divmenu" class="ui container">
|
||
|
<div class="ui grid">
|
||
|
<div class="three wide column">
|
||
|
<div class="ui compact segment menu_segment">
|
||
|
<a href="{{ url_for('redirect_root') }}"><img class="logo"
|
||
|
src="{{ url_for('static',filename='logo128.png') }}"></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="ten wide right aligned compact column">
|
||
|
<div id="button_menu" class="ui center aligned segment menu_segment" hidden="hidden">
|
||
|
<div class="ui inverted compact borderless labeled icon massive menu menu_segment">
|
||
|
{% if settings.general.getboolean('use_sonarr') %}
|
||
|
<a class="item" href="{{ url_for('series') }}">
|
||
|
<i class="play icon"></i>
|
||
|
Series
|
||
|
</a>
|
||
|
{% endif %}
|
||
|
{% if settings.general.getboolean('use_radarr') %}
|
||
|
<a class="item" href="{{ url_for('movies') }}">
|
||
|
<i class="film icon"></i>
|
||
|
Movies
|
||
|
</a>
|
||
|
{% endif %}
|
||
|
<a class="item" href="{{ url_for('history') }}">
|
||
|
<i class="wait icon"></i>
|
||
|
History
|
||
|
</a>
|
||
|
<a class="item" href="{{ url_for('wanted') }}">
|
||
|
<i id="wanted" class="warning sign icon">
|
||
|
</i>
|
||
|
Wanted
|
||
|
</a>
|
||
|
<a class="item" href="{{ url_for('_settings') }}">
|
||
|
<i class="settings icon"></i>
|
||
|
Settings
|
||
|
</a>
|
||
|
<a id="throttled_providers_count" class="item" href="{{ url_for('system') }}">
|
||
|
<i class="laptop icon"></i>
|
||
|
System
|
||
|
</a>
|
||
|
<a id="donate" class="item" href="https://beerpay.io/morpheus65535/bazarr">
|
||
|
<i class="red heart icon"></i>
|
||
|
Donate
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="ui center aligned segment menu_segment">
|
||
|
<div class="ui grid">
|
||
|
<div id="search_column" class="centered column">
|
||
|
<div class="ui fluid search">
|
||
|
<div class="ui left icon fluid input">
|
||
|
<input class="prompt" type="text" placeholder="Search in your library">
|
||
|
<i class="searchicon search icon"></i>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{# What is this ? #}
|
||
|
<div class="three wide right aligned column">
|
||
|
<div id="dropdown_menu" class="ui segment menu_segment" hidden="hidden">
|
||
|
<div id="icon_menu" class="ui compact tiny icon menu">
|
||
|
<div id="dropdown_menu_button" class="ui floating right dropdown item">
|
||
|
<i class="inverted bars icon"></i>
|
||
|
<div class="ui menu">
|
||
|
{% if settings.general.getboolean('use_sonarr') %}
|
||
|
<a class="item" href="{{ url_for('series') }}">
|
||
|
<i class="play icon"></i>
|
||
|
Series
|
||
|
</a>
|
||
|
{% endif %}
|
||
|
{% if settings.general.getboolean('use_radarr') %}
|
||
|
<a class="item" href="{{ url_for('movies') }}">
|
||
|
<i class="film icon"></i>
|
||
|
Movies
|
||
|
</a>
|
||
|
{% endif %}
|
||
|
<a class="item" href="{{ url_for('history') }}">
|
||
|
<i class="wait icon"></i>
|
||
|
History
|
||
|
</a>
|
||
|
<a class="item" href="{{ url_for('wanted') }}">
|
||
|
<i class="warning sign icon"></i>
|
||
|
<span style="margin-right: 1em;">Wanted</span>
|
||
|
</a>
|
||
|
<a class="item" href="{{ url_for('_settings') }}">
|
||
|
<i class="settings icon"></i>
|
||
|
Settings
|
||
|
</a>
|
||
|
<a class="item" href="{{ url_for('system') }}">
|
||
|
<i class="laptop icon">
|
||
|
{% if throttled_providers_count %}
|
||
|
<div class="floating ui tiny yellow label"
|
||
|
style="left:90% !important;top:0.5em !important;">
|
||
|
{{ throttled_providers_count }}
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</i>
|
||
|
System
|
||
|
</a>
|
||
|
<a id="donate" class="item" href="https://beerpay.io/morpheus65535/bazarr">
|
||
|
<i class="red heart icon"></i>
|
||
|
Donate
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
{% if update_required == '1' and restart_required == '1' %}
|
||
|
<div class='ui center aligned grid'>
|
||
|
<div class='fifteen wide column'>
|
||
|
<div class="ui red message">Bazarr Needs To Be Restarted To Apply The Last Update & Changes To
|
||
|
General
|
||
|
Settings. Click <a href=# id="restart_link">Here</a> To Restart.
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% elif updaterequired == '1' %}
|
||
|
<div class='ui center aligned grid'>
|
||
|
<div class='fifteen wide column'>
|
||
|
<div class="ui red message">Bazarr Needs To Be Restarted To Apply Changes To The Last Update. Click
|
||
|
<a
|
||
|
href=# id="restart_link">Here</a> To Restart.
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% elif restart_required == '1' %}
|
||
|
<div class='ui center aligned grid'>
|
||
|
<div class='fifteen wide column'>
|
||
|
<div class="ui red message">Bazarr Needs To Be Restarted To Apply Changes To General Settings. Click
|
||
|
<a
|
||
|
href=# id="restart_link">Here</a> To Restart.
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
|
||
|
{% if PY2 %}
|
||
|
<div class='ui left aligned grid'>
|
||
|
<div class='fluid column'>
|
||
|
<div class="ui yellow icon message">
|
||
|
<i class="python icon"></i>
|
||
|
<div class="content">
|
||
|
<div class="header">Python deprecation warning</div>
|
||
|
Bazarr is now compatible with Python 3.6 and newer. You should upgrade Python as we'll drop
|
||
|
support
|
||
|
for Python 2.7.x by the end of 2019.
|
||
|
<div class="ui bulleted list">
|
||
|
{% if os.name == 'posix' %}
|
||
|
<div class="item">If you are running under Docker, don't worry, we'll take care of
|
||
|
this for
|
||
|
you.
|
||
|
Just pull the new image.
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
{% if os.name == 'nt' %}
|
||
|
<div class="item">If you have installed using the Windows Installer, we'll provide a
|
||
|
new
|
||
|
installer soon.
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
<div class="item">If you are running from source, it's up to you to install Python 3 and
|
||
|
use
|
||
|
it
|
||
|
to run Bazarr.
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
|
||
|
{% block body %}
|
||
|
|
||
|
{% endblock body %}
|
||
|
<div style='margin-bottom:2em; color:Gray;' class="ui center aligned container">
|
||
|
Bazarr Ver. {{ bazarr_version }}
|
||
|
</div>
|
||
|
{% endblock page_body %}
|
||
|
|
||
|
|
||
|
</body>
|
||
|
|
||
|
{% block tail_js %}
|
||
|
<script src="{{ url_for('static',filename='jquery/jquery-latest.min.js') }}" type="text/javascript"></script>
|
||
|
<script src="{{ url_for('static',filename='semantic/semantic.min.js') }}" type="text/javascript"></script>
|
||
|
<script src="{{ url_for('static',filename='noty/noty.min.js') }}" type="text/javascript"></script>
|
||
|
<script src="{{ url_for('static',filename='jquery/tablesort.js') }}" type="text/javascript"></script>
|
||
|
|
||
|
<script>
|
||
|
$('.ui.dropdown').dropdown();
|
||
|
|
||
|
$('.ui.search')
|
||
|
.search({
|
||
|
apiSettings: {
|
||
|
url: '{{base_url}}search_json/{query}',
|
||
|
onResponse: function (results) {
|
||
|
const response = {
|
||
|
results: []
|
||
|
};
|
||
|
$.each(results.items, function (index, item) {
|
||
|
response.results.push({
|
||
|
title: item.name,
|
||
|
url: item.url
|
||
|
});
|
||
|
});
|
||
|
return response;
|
||
|
}
|
||
|
},
|
||
|
minCharacters: 2
|
||
|
});
|
||
|
|
||
|
function BadgesAjax() {
|
||
|
$.ajax({
|
||
|
url: "{{url_for('api.badges')}}",
|
||
|
async: true,
|
||
|
success: function (data) {
|
||
|
console.log(data);
|
||
|
if (data['throttled_providers']) {
|
||
|
$('#throttled_providers_count').append('<div class="floating ui tiny yellow label" style="left:90% !important;top:0.5em !important;">' + data['throttled_providers'] + '</div>')
|
||
|
}
|
||
|
if (data['missing_episodes']) {
|
||
|
$('#wanted').append('<div class="floating ui tiny yellow label" style="left:90% !important;top:0.5em !important;">' + data['missing_episodes'] + '</div>')
|
||
|
}
|
||
|
if (data['missing_movies']) {
|
||
|
$('#wanted').append('<div id="wanted_movies" class="floating ui tiny green label" style="left:90% !important;top:3em !important;">' + data['missing_movies'] + '</div>')
|
||
|
}
|
||
|
|
||
|
},
|
||
|
error: (function () {
|
||
|
setTimeout(function () {
|
||
|
setInterval(ping, 2000);
|
||
|
}, 8000);
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
|
||
|
BadgesAjax()
|
||
|
|
||
|
|
||
|
if (window.location.href.indexOf("episodes") > -1) {
|
||
|
$('.menu_segment').css('background', 'rgba(0, 0, 0, 0.8)');
|
||
|
$('.menu_segment').css('border-color', '#000000');
|
||
|
$('#divmenu').css('background', 'rgba(0, 0, 0, 0.8)');
|
||
|
$('#divmenu').css('box-shadow', '0 0 5px 5px #000000');
|
||
|
} else if (window.location.href.indexOf("movie/") > -1) {
|
||
|
$('.menu_segment').css('background', 'rgba(0, 0, 0, 0.9)');
|
||
|
$('.menu_segment').css('border-color', '#000000');
|
||
|
$('#divmenu').css('background', 'rgba(0, 0, 0, 0.8)');
|
||
|
$('#divmenu').css('box-shadow', '0 0 5px 5px #000000');
|
||
|
} else {
|
||
|
$('.menu_segment').css('background', '#272727');
|
||
|
$('.menu_segment').css('border-color', '#272727');
|
||
|
$('#divmenu').css('background', '#272727');
|
||
|
}
|
||
|
|
||
|
$('#restart_link').on('click', function () {
|
||
|
$('#loader_text').text("Bazarr is restarting. Please Wait...");
|
||
|
$.ajax({
|
||
|
url: {{url_for('restart')}},
|
||
|
async: true,
|
||
|
error: (function () {
|
||
|
setTimeout(function () {
|
||
|
setInterval(ping, 2000);
|
||
|
}, 8000);
|
||
|
})
|
||
|
})
|
||
|
});
|
||
|
|
||
|
function ping() {
|
||
|
$.ajax({
|
||
|
url: "{{url_for('redirect_root')}}",
|
||
|
success: function (result) {
|
||
|
window.location.href = "{{url_for('redirect_root')}}";
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
$(window).on('resize', function () {
|
||
|
if ($(window).width() < 1024) {
|
||
|
$('#button_menu').hide();
|
||
|
$('#dropdown_menu').show();
|
||
|
$('#search_column').removeClass('ten wide');
|
||
|
} else {
|
||
|
$('#dropdown_menu').hide();
|
||
|
$('#button_menu').show();
|
||
|
$('#search_column').addClass('ten wide');
|
||
|
}
|
||
|
}).resize();
|
||
|
|
||
|
var url_notifications = location.protocol + "//" + window.location.host + "{{base_url}}notifications";
|
||
|
var notificationTimeout;
|
||
|
var timeout;
|
||
|
var killer;
|
||
|
var item = {};
|
||
|
var length = {};
|
||
|
|
||
|
function doNotificationsAjax() {
|
||
|
$.ajax({
|
||
|
url: "{{url_for('notifications')}}",
|
||
|
success: function (data) {
|
||
|
if (data !== "") {
|
||
|
data = JSON.parse(data);
|
||
|
var msg = data[0];
|
||
|
var type = data[1];
|
||
|
var duration = data[2];
|
||
|
var button = data[3];
|
||
|
var queue = data[4];
|
||
|
var item = data[5];
|
||
|
var length = data[6];
|
||
|
|
||
|
if (length === 0) {
|
||
|
var message = msg;
|
||
|
} else {
|
||
|
var message = msg + '<p><div class="ui disabled progress notification_progress" data-value=' + item + ' data-total=' + length + ' style="margin-bottom: -0.25em"><div class="bar"><div class="progress"></div></div></div>'
|
||
|
}
|
||
|
|
||
|
if (duration === 'temporary') {
|
||
|
timeout = 3000;
|
||
|
killer = queue;
|
||
|
} else if (duration === 'long') {
|
||
|
timeout = 15000;
|
||
|
killer = queue;
|
||
|
} else {
|
||
|
timeout = false;
|
||
|
killer = false;
|
||
|
}
|
||
|
|
||
|
if (button === 'refresh') {
|
||
|
button = [Noty.button('Refresh', 'ui tiny primary button', function () {
|
||
|
window.location.reload()
|
||
|
})];
|
||
|
} else if (button === 'restart') {
|
||
|
// to be completed
|
||
|
button = [Noty.button('Restart', 'ui tiny primary button', function () {
|
||
|
alert('Restart Not Implemented Yet!')
|
||
|
})];
|
||
|
} else {
|
||
|
button = [];
|
||
|
}
|
||
|
|
||
|
new Noty({
|
||
|
text: message,
|
||
|
progressBar: false,
|
||
|
animation: {
|
||
|
open: null,
|
||
|
close: null
|
||
|
},
|
||
|
type: type,
|
||
|
layout: 'bottomRight',
|
||
|
theme: 'semanticui',
|
||
|
queue: queue,
|
||
|
timeout: timeout,
|
||
|
killer: killer,
|
||
|
buttons: button,
|
||
|
force: false
|
||
|
}).show();
|
||
|
|
||
|
$('.notification_progress').progress({
|
||
|
duration: 0,
|
||
|
autoSuccess: false,
|
||
|
label: 'ratio',
|
||
|
text: {
|
||
|
ratio: '{value} / {total}'
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
},
|
||
|
complete: function (data) {
|
||
|
// Schedule the next
|
||
|
if (data.responseText !== "") {
|
||
|
notificationTimeout = setTimeout(doNotificationsAjax, 100);
|
||
|
} else {
|
||
|
notificationTimeout = setTimeout(doNotificationsAjax, 5000);
|
||
|
}
|
||
|
},
|
||
|
error: function () {
|
||
|
notificationTimeout = setTimeout(doNotificationsAjax, 5000);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// notificationTimeout = setTimeout(doNotificationsAjax, 1000);
|
||
|
|
||
|
var tasksTimeout;
|
||
|
|
||
|
function doTasksAjax() {
|
||
|
$.ajax({
|
||
|
url: "{{url_for('running_tasks_list')}}",
|
||
|
dataType: 'json',
|
||
|
success: function (data) {
|
||
|
$('#tasks > tbody > tr').each(function () {
|
||
|
if ($.inArray($(this).attr('id'), data['tasks']) > -1) {
|
||
|
$(this).find('td:last').find('div:first').addClass('disabled');
|
||
|
$(this).find('td:last').find('div:first').find('i:first').addClass('loading');
|
||
|
} else {
|
||
|
$(this).find('td:last').find('div:first').removeClass('disabled');
|
||
|
$(this).find('td:last').find('div:first').find('i:first').removeClass('loading');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
if ($.inArray('wanted_search_missing_subtitles', data['tasks']) > -1) {
|
||
|
$('#wanted_search_missing_subtitles').addClass('disabled');
|
||
|
$('#wanted_search_missing_subtitles_movies').addClass('disabled');
|
||
|
$('#wanted_search_missing_subtitles').find('i:first').addClass('loading');
|
||
|
$('#wanted_search_missing_subtitles_movies').find('i:first').addClass('loading');
|
||
|
} else {
|
||
|
$('#wanted_search_missing_subtitles').removeClass('disabled');
|
||
|
$('#wanted_search_missing_subtitles_movies').removeClass('disabled');
|
||
|
$('#wanted_search_missing_subtitles').find('i:first').removeClass('loading');
|
||
|
$('#wanted_search_missing_subtitles_movies').find('i:first').removeClass('loading');
|
||
|
}
|
||
|
|
||
|
{% if 'no' in locals %}
|
||
|
if ($.inArray('search_missing_subtitles_{{no}}', data['tasks']) > -1) {
|
||
|
$('#search_missing_subtitles').addClass('disabled');
|
||
|
$('#search_missing_subtitles').find('i:first').addClass('loading');
|
||
|
} else {
|
||
|
$('#search_missing_subtitles').removeClass('disabled');
|
||
|
$('#search_missing_subtitles').find('i:first').removeClass('loading');
|
||
|
}
|
||
|
|
||
|
if ($.inArray('search_missing_subtitles_movie_{{no}}', data['tasks']) > -1) {
|
||
|
$('#search_missing_subtitles_movie').addClass('disabled');
|
||
|
$('#search_missing_subtitles_movie').find('i:first').addClass('loading');
|
||
|
} else {
|
||
|
$('#search_missing_subtitles_movie').removeClass('disabled');
|
||
|
$('#search_missing_subtitles_movie').find('i:first').removeClass('loading');
|
||
|
}
|
||
|
{% endif %}
|
||
|
},
|
||
|
complete: function (data) {
|
||
|
// Schedule the next
|
||
|
tasksTimeout = setTimeout(doTasksAjax, 5000);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// tasksTimeout = setTimeout(doTasksAjax, 500);
|
||
|
|
||
|
$(window).bind('beforeunload', function () {
|
||
|
clearTimeout(tasksTimeout);
|
||
|
clearTimeout(notificationTimeout);
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock tail_js %}
|
||
|
{% block tail %}
|
||
|
{% endblock tail %}
|
||
|
|
||
|
</html>
|