commit
9efdcde095
@ -0,0 +1,108 @@
|
||||
import os
|
||||
import sqlite3
|
||||
import requests
|
||||
|
||||
from get_general_settings import *
|
||||
from list_subtitles import *
|
||||
|
||||
def update_movies():
|
||||
from get_radarr_settings import get_radarr_settings
|
||||
url_radarr = get_radarr_settings()[0]
|
||||
url_radarr_short = get_radarr_settings()[1]
|
||||
apikey_radarr = get_radarr_settings()[2]
|
||||
|
||||
# Open database connection
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'), timeout=30)
|
||||
c = db.cursor()
|
||||
|
||||
if apikey_radarr == None:
|
||||
pass
|
||||
else:
|
||||
get_profile_list()
|
||||
|
||||
# Get movies data from radarr
|
||||
url_radarr_api_movies = url_radarr + "/api/movie?apikey=" + apikey_radarr
|
||||
r = requests.get(url_radarr_api_movies)
|
||||
|
||||
# Get current movies in DB
|
||||
current_movies_db = c.execute('SELECT tmdbId FROM table_movies').fetchall()
|
||||
current_movies_db_list = [x[0] for x in current_movies_db]
|
||||
current_movies_radarr = []
|
||||
|
||||
for movie in r.json():
|
||||
if movie['hasFile'] is True:
|
||||
try:
|
||||
overview = unicode(movie['overview'])
|
||||
except:
|
||||
overview = ""
|
||||
try:
|
||||
poster_big = movie['images'][0]['url']
|
||||
poster = os.path.splitext(poster_big)[0] + '-500' + os.path.splitext(poster_big)[1]
|
||||
except:
|
||||
poster = ""
|
||||
try:
|
||||
fanart = movie['images'][1]['url']
|
||||
except:
|
||||
fanart = ""
|
||||
|
||||
if 'sceneName' in movie['movieFile']:
|
||||
sceneName = movie['movieFile']['sceneName']
|
||||
else:
|
||||
sceneName = None
|
||||
|
||||
# Add movies in radarr to current movies list
|
||||
current_movies_radarr.append(unicode(movie['tmdbId']))
|
||||
|
||||
# Detect file separator
|
||||
if movie['path'][0] == "/":
|
||||
separator = "/"
|
||||
else:
|
||||
separator == "\\"
|
||||
|
||||
# Update or insert movies list in database table
|
||||
try:
|
||||
c.execute('''INSERT INTO table_movies(title, path, tmdbId, languages,`hearing_impaired`, radarrId, overview, poster, fanart, `audio_language`, sceneName) VALUES (?,?,?,(SELECT languages FROM table_movies WHERE tmdbId = ?),(SELECT `hearing_impaired` FROM table_movies WHERE tmdbId = ?), ?, ?, ?, ?, ?, ?)''', (movie["title"], movie["path"] + separator + movie['movieFile']['relativePath'], movie["tmdbId"], movie["tmdbId"], movie["tmdbId"], movie["id"], overview, poster, fanart, profile_id_to_language(movie['qualityProfileId']), sceneName))
|
||||
except:
|
||||
c.execute('''UPDATE table_movies SET title = ?, path = ?, tmdbId = ?, radarrId = ?, overview = ?, poster = ?, fanart = ?, `audio_language` = ?, sceneName = ? WHERE tmdbid = ?''', (movie["title"],movie["path"] + separator + movie['movieFile']['relativePath'],movie["tmdbId"],movie["id"],overview,poster,fanart,profile_id_to_language(movie['qualityProfileId']),sceneName,movie["tmdbId"]))
|
||||
|
||||
# Commit changes to database table
|
||||
db.commit()
|
||||
|
||||
# Delete movies not in radarr anymore
|
||||
added_movies = list(set(current_movies_radarr) - set(current_movies_db_list))
|
||||
removed_movies = list(set(current_movies_db_list) - set(current_movies_radarr))
|
||||
|
||||
for removed_movie in removed_movies:
|
||||
c.execute('DELETE FROM table_movies WHERE radarrId = ?', (removed_movie,))
|
||||
db.commit()
|
||||
|
||||
for added_movie in added_movies:
|
||||
added_path = c.execute('SELECT path FROM table_movies WHERE tmdbId = ?', (added_movie,)).fetchone()
|
||||
store_subtitles_movie(path_replace(added_path[0]))
|
||||
|
||||
# Close database connection
|
||||
db.close()
|
||||
|
||||
def get_profile_list():
|
||||
from get_radarr_settings import get_radarr_settings
|
||||
url_radarr = get_radarr_settings()[0]
|
||||
url_radarr_short = get_radarr_settings()[1]
|
||||
apikey_radarr = get_radarr_settings()[2]
|
||||
|
||||
# Get profiles data from radarr
|
||||
url_radarr_api_movies = url_radarr + "/api/profile?apikey=" + apikey_radarr
|
||||
profiles_json = requests.get(url_radarr_api_movies)
|
||||
global profiles_list
|
||||
profiles_list = []
|
||||
|
||||
# Parsing data returned from radarr
|
||||
for profile in profiles_json.json():
|
||||
profiles_list.append([profile['id'], profile['language'].capitalize()])
|
||||
|
||||
def profile_id_to_language(id):
|
||||
for profile in profiles_list:
|
||||
if id == profile[0]:
|
||||
return profile[1]
|
||||
|
||||
if __name__ == '__main__':
|
||||
update_movies()
|
@ -0,0 +1,40 @@
|
||||
import sqlite3
|
||||
import os
|
||||
import ast
|
||||
|
||||
def get_radarr_settings():
|
||||
# Open database connection
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'), timeout=30)
|
||||
c = db.cursor()
|
||||
|
||||
# Get Radarr API URL from database config table
|
||||
c.execute('''SELECT * FROM table_settings_radarr''')
|
||||
config_radarr = c.fetchone()
|
||||
|
||||
# Close database connection
|
||||
db.close()
|
||||
|
||||
# Build radarr URL
|
||||
ip_radarr = config_radarr[0]
|
||||
port_radarr = str(config_radarr[1])
|
||||
baseurl_radarr = config_radarr[2]
|
||||
ssl_radarr = config_radarr[3]
|
||||
apikey_radarr = config_radarr[4]
|
||||
full_update = config_radarr[5]
|
||||
|
||||
if ssl_radarr == 1:
|
||||
protocol_radarr = "https"
|
||||
else:
|
||||
protocol_radarr = "http"
|
||||
|
||||
if baseurl_radarr == None:
|
||||
baseurl_radarr = "/"
|
||||
if baseurl_radarr.startswith("/") == False:
|
||||
baseurl_radarr = "/" + baseurl_radarr
|
||||
if baseurl_radarr.endswith("/"):
|
||||
baseurl_radarr = baseurl_radarr[:-1]
|
||||
|
||||
url_radarr = protocol_radarr + "://" + ip_radarr + ":" + port_radarr + baseurl_radarr
|
||||
url_radarr_short = protocol_radarr + "://" + ip_radarr + ":" + port_radarr
|
||||
|
||||
return [url_radarr, url_radarr_short, apikey_radarr, full_update]
|
@ -1,214 +1,138 @@
|
||||
<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>History - 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: 3em;
|
||||
}
|
||||
.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; }
|
||||
#bottommenu {
|
||||
background-color: #333333;
|
||||
box-shadow: 0 0 10px 1px #333;
|
||||
padding: 10px;
|
||||
margin-bottom: -2em !important;
|
||||
}
|
||||
.label, .value {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<table id="tablehistory" class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Series</th>
|
||||
<th>Episode</th>
|
||||
<th>Episode Title</th>
|
||||
<th>Date</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import time
|
||||
%import pretty
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td class="collapsing">
|
||||
%if row[0] == 0:
|
||||
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been erased." data-inverted="">
|
||||
<i class="ui trash icon"></i>
|
||||
</div>
|
||||
%elif row[0] == 1:
|
||||
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been downloaded." data-inverted="">
|
||||
<i class="ui download icon"></i>
|
||||
</div>
|
||||
%end
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{base_url}}episodes/{{row[6]}}">{{row[1]}}</a>
|
||||
</td>
|
||||
<td class="collapsing">
|
||||
%if row[2] is not None:
|
||||
% episode = row[2].split('x')
|
||||
{{episode[0] + 'x' + episode[1].zfill(2)}}
|
||||
%end
|
||||
</td>
|
||||
<td>
|
||||
%if row[3] is not None:
|
||||
{{row[3]}}
|
||||
%else:
|
||||
<em>Deleted episode</em>
|
||||
%end
|
||||
</td>
|
||||
<td class="collapsing">
|
||||
<div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row[4]))}}" data-inverted="">
|
||||
{{pretty.date(int(row[4]))}}
|
||||
</div>
|
||||
</td>
|
||||
<td>{{row[5]}}</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
<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: {{row_count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='bottommenu' class="ui fluid inverted bottom fixed five item menu">
|
||||
<div class="ui statistics">
|
||||
<div class="statistic">
|
||||
<div class="text value">
|
||||
<br>
|
||||
Statistics
|
||||
</div>
|
||||
<div class="label">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[0]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since 24 hours
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[1]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since one week
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[2]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since one year
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[3]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Total
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
% include('footer.tpl')
|
||||
<br><br><br><br>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
if (sessionStorage.scrolly) {
|
||||
$(window).scrollTop(sessionStorage.scrolly);
|
||||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('a, i').click(function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.backward').click(function(){
|
||||
location.href="?page={{int(page)-1}}";
|
||||
})
|
||||
$('.fast.backward').click(function(){
|
||||
location.href="?page=1";
|
||||
})
|
||||
$('.forward').click(function(){
|
||||
location.href="?page={{int(page)+1}}";
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
location.href="?page={{int(max_page)}}";
|
||||
})
|
||||
<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>History - 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; }
|
||||
.ui.tabular.menu > .disabled.item {
|
||||
opacity: 0.45 !important;
|
||||
pointer-events: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
% import os
|
||||
% import sqlite3
|
||||
|
||||
% conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'), timeout=30)
|
||||
% c = conn.cursor()
|
||||
|
||||
% integration = c.execute("SELECT use_sonarr, use_radarr FROM table_settings_general").fetchone()
|
||||
|
||||
% c.close()
|
||||
<div id="fondblanc" class="ui container">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a id="series_tab" class="tabs item active" data-enabled="{{integration[0]}}" data-tab="series">Series</a>
|
||||
<a id="movies_tab" class="tabs item" data-enabled="{{integration[1]}}" data-tab="movies">Movies</a>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="series">
|
||||
<div class="content">
|
||||
<div id="content_series"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="movies">
|
||||
<div class="content">
|
||||
<div id="content_movies"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% include('footer.tpl')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
$('.menu .item')
|
||||
.tab()
|
||||
;
|
||||
|
||||
$('#series_tab').click(function() {
|
||||
loadURLseries(1);
|
||||
})
|
||||
|
||||
$('#movies_tab').click(function() {
|
||||
loadURLmovies(1);
|
||||
})
|
||||
|
||||
function loadURLseries(page) {
|
||||
$.ajax({
|
||||
url: "{{base_url}}historyseries?page=" + page,
|
||||
beforeSend: function() { $('#loader').addClass('active'); },
|
||||
complete: function() { $('#loader').removeClass('active'); },
|
||||
cache: false
|
||||
}).done(function(data) {
|
||||
$("#content_series").html(data);
|
||||
});
|
||||
}
|
||||
|
||||
function loadURLmovies(page) {
|
||||
$.ajax({
|
||||
url: "{{base_url}}historymovies?page=" + page,
|
||||
beforeSend: function() { $('#loader').addClass('active'); },
|
||||
complete: function() { $('#loader').removeClass('active'); },
|
||||
cache: false
|
||||
}).done(function(data) {
|
||||
$("#content_movies").html(data);
|
||||
});
|
||||
}
|
||||
|
||||
$('a:not(.tabs), button:not(.cancel, #download_log)').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
if ($('#series_tab').data("enabled") == "True") {
|
||||
$("#series_tab").removeClass('disabled');
|
||||
} else {
|
||||
$("#series_tab").addClass('disabled');
|
||||
}
|
||||
|
||||
if ($('#movies_tab').data("enabled") == "True") {
|
||||
$("#movies_tab").removeClass('disabled');
|
||||
} else {
|
||||
$("#movies_tab").addClass('disabled');
|
||||
}
|
||||
if ($('#series_tab').data("enabled") == "True") {
|
||||
$( "#series_tab" ).trigger( "click" );
|
||||
}
|
||||
if ($('#series_tab').data("enabled") == "False" && $('#movies_tab').data("enabled") == "True") {
|
||||
$( "#movies_tab" ).trigger( "click" );
|
||||
}
|
||||
</script>
|
@ -0,0 +1,199 @@
|
||||
<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>History - 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: 3em;
|
||||
}
|
||||
.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; }
|
||||
#bottommenu {
|
||||
background-color: #333333;
|
||||
box-shadow: 0 0 10px 1px #333;
|
||||
padding: 10px;
|
||||
margin-bottom: -2em !important;
|
||||
}
|
||||
.label, .value {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
|
||||
<div class="ui container">
|
||||
<table id="tablehistory" class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Date</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import time
|
||||
%import pretty
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td class="collapsing">
|
||||
%if row[0] == 0:
|
||||
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been erased." data-inverted="">
|
||||
<i class="ui trash icon"></i>
|
||||
</div>
|
||||
%elif row[0] == 1:
|
||||
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been downloaded." data-inverted="">
|
||||
<i class="ui download icon"></i>
|
||||
</div>
|
||||
%end
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{base_url}}movie/{{row[4]}}">{{row[1]}}</a>
|
||||
</td>
|
||||
<td class="collapsing">
|
||||
<div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row[2]))}}" data-inverted="">
|
||||
{{pretty.date(int(row[2]))}}
|
||||
</div>
|
||||
</td>
|
||||
<td>{{row[3]}}</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
<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: {{row_count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='bottommenu' class="ui fluid inverted bottom fixed five item menu">
|
||||
<div class="ui small statistics">
|
||||
<div class="statistic">
|
||||
<div class="text value">
|
||||
<br>
|
||||
Movies
|
||||
<br>
|
||||
statistics
|
||||
</div>
|
||||
<div class="label">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[0]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since 24 hours
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[1]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since one week
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[2]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since one year
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[3]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Total
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br><br><br><br>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
if (sessionStorage.scrolly) {
|
||||
$(window).scrollTop(sessionStorage.scrolly);
|
||||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('a, i').click(function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
loadURLseries(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
loadURLseries({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
loadURLseries({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
loadURLseries({{int(max_page)}});
|
||||
})
|
||||
</script>
|
@ -0,0 +1,214 @@
|
||||
<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>History - 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: 3em;
|
||||
}
|
||||
.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; }
|
||||
#bottommenu {
|
||||
background-color: #333333;
|
||||
box-shadow: 0 0 10px 1px #333;
|
||||
padding: 10px;
|
||||
margin-bottom: -2em !important;
|
||||
}
|
||||
.label, .value {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
|
||||
<div class="ui container">
|
||||
<table id="tablehistory" class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Episode</th>
|
||||
<th>Episode Title</th>
|
||||
<th>Date</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import time
|
||||
%import pretty
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td class="collapsing">
|
||||
%if row[0] == 0:
|
||||
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been erased." data-inverted="">
|
||||
<i class="ui trash icon"></i>
|
||||
</div>
|
||||
%elif row[0] == 1:
|
||||
<div class="ui inverted basic compact icon" data-tooltip="Subtitles file have been downloaded." data-inverted="">
|
||||
<i class="ui download icon"></i>
|
||||
</div>
|
||||
%end
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{base_url}}episodes/{{row[6]}}">{{row[1]}}</a>
|
||||
</td>
|
||||
<td class="collapsing">
|
||||
%if row[2] is not None:
|
||||
% episode = row[2].split('x')
|
||||
{{episode[0] + 'x' + episode[1].zfill(2)}}
|
||||
%end
|
||||
</td>
|
||||
<td>
|
||||
%if row[3] is not None:
|
||||
{{row[3]}}
|
||||
%else:
|
||||
<em>Deleted episode</em>
|
||||
%end
|
||||
</td>
|
||||
<td class="collapsing">
|
||||
<div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row[4]))}}" data-inverted="">
|
||||
{{pretty.date(int(row[4]))}}
|
||||
</div>
|
||||
</td>
|
||||
<td>{{row[5]}}</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
<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: {{row_count}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='bottommenu' class="ui fluid inverted bottom fixed five item menu">
|
||||
<div class="ui small statistics">
|
||||
<div class="statistic">
|
||||
<div class="text value">
|
||||
<br>
|
||||
Series
|
||||
<br>
|
||||
statistics
|
||||
</div>
|
||||
<div class="label">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[0]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since 24 hours
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[1]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since one week
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[2]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Since one year
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">
|
||||
{{stats[3]}}
|
||||
</div>
|
||||
<div class="label">
|
||||
Total
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br><br><br><br>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
if (sessionStorage.scrolly) {
|
||||
$(window).scrollTop(sessionStorage.scrolly);
|
||||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('a, i').click(function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
loadURLseries(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
loadURLseries({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
loadURLseries({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
loadURLseries({{int(max_page)}});
|
||||
})
|
||||
</script>
|
@ -0,0 +1,315 @@
|
||||
<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>{{details[0]}} - Bazarr</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #1b1c1d;
|
||||
background-image: url("{{base_url}}image_proxy_movies{{details[3]}}");
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
background-position:center center;
|
||||
}
|
||||
#divdetails {
|
||||
background-color: #000000;
|
||||
opacity: 0.9;
|
||||
color: #ffffff;
|
||||
margin-top: 6em;
|
||||
margin-bottom: 3em;
|
||||
padding: 2em;
|
||||
border-radius: 1px;
|
||||
box-shadow: 0px 0px 5px 5px #000000;
|
||||
min-height: calc(250px + 4em);
|
||||
}
|
||||
#fondblanc {
|
||||
background-color: #ffffff;
|
||||
opacity: 0.9;
|
||||
border-radius: 1px;
|
||||
box-shadow: 0px 0px 3px 3px #ffffff;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 3em;
|
||||
padding-top: 2em;
|
||||
padding-left: 2em;
|
||||
padding-right: 2em;
|
||||
padding-bottom: 1em;
|
||||
text-color: black;
|
||||
}
|
||||
.ui.basic.button:hover, .ui.basic.buttons .button:hover {
|
||||
background: transparent !important;
|
||||
}
|
||||
.ui.basic.button:active, .ui.basic.buttons .button:active {
|
||||
background: transparent !important;
|
||||
}
|
||||
.ui.basic.button:focus, .ui.basic.buttons .button:focus {
|
||||
background: transparent !important;
|
||||
}
|
||||
.ui.basic.button:visited, .ui.basic.buttons .button:visited {
|
||||
background: transparent !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
%import ast
|
||||
%import pycountry
|
||||
%from get_general_settings import *
|
||||
%single_language = get_general_settings()[7]
|
||||
<div style="display: none;"><img src="{{base_url}}image_proxy_movies{{details[3]}}"></div>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div style='padding-left: 2em; padding-right: 2em;' class='ui container'>
|
||||
<div id="divdetails" class="ui container">
|
||||
<img class="left floated ui image" style="max-height:250px;" src="{{base_url}}image_proxy_movies{{details[2]}}">
|
||||
<div class="ui right floated basic icon buttons">
|
||||
<button id="scan_disk" class="ui button" data-tooltip="Scan disk for subtitles" data-inverted=""><i class="ui inverted large compact refresh icon"></i></button>
|
||||
<button id="search_missing_subtitles" class="ui button" data-tooltip="Download missing subtitles" data-inverted=""><i class="ui inverted huge compact search icon"></i></button>
|
||||
<%
|
||||
subs_languages = ast.literal_eval(str(details[7]))
|
||||
subs_languages_list = []
|
||||
if subs_languages is not None:
|
||||
for subs_language in subs_languages:
|
||||
subs_languages_list.append(subs_language)
|
||||
end
|
||||
end
|
||||
%>
|
||||
<button id="config" class="ui button" data-tooltip="Edit movie" data-inverted="" data-tmdbid="{{details[5]}}" data-title="{{details[0]}}" data-poster="{{details[2]}}" data-audio="{{details[6]}}" data-languages="{{!subs_languages_list}}" data-hearing-impaired="{{details[4]}}"><i class="ui inverted large compact configure icon"></i></button>
|
||||
</div>
|
||||
<h2>{{details[0]}}</h2>
|
||||
<p>{{details[1]}}</p>
|
||||
<p style='margin-top: 3em;'>
|
||||
<div class="ui tiny inverted label" style='background-color: #777777;'>{{details[6]}}</div>
|
||||
<div class="ui tiny inverted label" style='background-color: #35c5f4;'>{{details[8]}}</div>
|
||||
</p>
|
||||
<p style='margin-top: 2em;'>
|
||||
%for language in subs_languages_list:
|
||||
<div class="ui tiny inverted label" style='background-color: #35c5f4;'>{{language}}</div>
|
||||
%end
|
||||
</p>
|
||||
<div style='clear:both;'></div>
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<table class="ui very basic single line selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Subtitles path</th>
|
||||
<th>Language</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%
|
||||
subtitles_files = ast.literal_eval(str(details[9]))
|
||||
if subtitles_files is not None:
|
||||
for subtitles_file in subtitles_files:
|
||||
%>
|
||||
<tr>
|
||||
<td>{{path_replace(subtitles_file[1]) if subtitles_file[1] is not None else 'Video file subtitles track'}}</td>
|
||||
<td><div class="ui tiny inverted label" style='background-color: #777777;'>{{pycountry.languages.lookup(str(subtitles_file[0])).name}}</div></td>
|
||||
<td>
|
||||
%if subtitles_file[1] is not None:
|
||||
<a class="remove_subtitles ui inverted basic compact icon" data-tooltip="Delete subtitles file from disk" data-inverted="" data-moviePath="{{details[8]}}" data-subtitlesPath="{{path_replace(subtitles_file[1])}}" data-language="{{pycountry.languages.lookup(str(subtitles_file[0])).alpha_3}}" data-radarrId={{details[10]}}>
|
||||
<i class="ui black delete icon"></i>
|
||||
</a>
|
||||
%end
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
end
|
||||
if len(subtitles_files) == 0:
|
||||
%>
|
||||
<tr><td colspan="3">No subtitles detected for this movie.</td></tr>
|
||||
<%
|
||||
end
|
||||
end
|
||||
%>
|
||||
</tbody>
|
||||
</table>
|
||||
<%
|
||||
missing_subs_languages = ast.literal_eval(str(details[11]))
|
||||
missing_subs_languages_list = []
|
||||
if missing_subs_languages is not None:
|
||||
%>
|
||||
<table class="ui very basic single line selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Missing subtitles</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<%
|
||||
for missing_subs_language in missing_subs_languages:
|
||||
%>
|
||||
<a class="get_subtitle ui small blue label" data-moviePath="{{details[8]}}" data-scenename="{{details[12]}}" data-language="{{pycountry.languages.lookup(str(missing_subs_language)).alpha_3}}" data-hi="{{details[4]}}" data-radarrId={{details[10]}}>
|
||||
{{pycountry.languages.lookup(str(missing_subs_language)).name}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
<%
|
||||
end
|
||||
end
|
||||
%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small modal">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">
|
||||
<div id="movie_title"></div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form name="movie_form" id="movie_form" action="" method="post" class="ui form">
|
||||
<div class="ui grid">
|
||||
<div class="four wide column">
|
||||
<img id="movie_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="movie_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="movie_languages" {{!'multiple="" ' if single_language == 'False' else ''}} class="ui fluid selection dropdown">
|
||||
<option value="">Languages</option>
|
||||
%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="movie_hearing-impaired_div" class="ui toggle checkbox">
|
||||
<input name="hearing_impaired" id="movie_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="movie_form" class="ui blue approve button">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
% include('footer.tpl')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$('#scan_disk').click(function(){
|
||||
window.location = '{{base_url}}scan_disk_movie/{{no}}';
|
||||
})
|
||||
|
||||
$('#search_missing_subtitles').click(function(){
|
||||
window.location = '{{base_url}}search_missing_subtitles_movie/{{no}}';
|
||||
})
|
||||
|
||||
$('.remove_subtitles').click(function(){
|
||||
var values = {
|
||||
moviePath: $(this).attr("data-moviePath"),
|
||||
language: $(this).attr("data-language"),
|
||||
subtitlesPath: $(this).attr("data-subtitlesPath"),
|
||||
radarrId: $(this).attr("data-radarrId"),
|
||||
tmdbid: {{tmdbid}}
|
||||
};
|
||||
$.ajax({
|
||||
url: "{{base_url}}remove_subtitles_movie",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: values
|
||||
});
|
||||
$(document).ajaxStart(function(){
|
||||
$('#loader').addClass('active');
|
||||
});
|
||||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
var values = {
|
||||
moviePath: $(this).attr("data-moviePath"),
|
||||
sceneName: $(this).attr("data-sceneName"),
|
||||
language: $(this).attr("data-language"),
|
||||
hi: $(this).attr("data-hi"),
|
||||
radarrId: $(this).attr("data-radarrId"),
|
||||
tmdbid: {{tmdbid}}
|
||||
};
|
||||
$.ajax({
|
||||
url: "{{base_url}}get_subtitle_movie",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: values
|
||||
});
|
||||
$(document).ajaxStart(function(){
|
||||
$('#loader').addClass('active');
|
||||
});
|
||||
$(document).ajaxStop(function(){
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
|
||||
$('a, .menu .item, button:not(#config, .cancel)').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
|
||||
$('#config').click(function(){
|
||||
$('#movie_form').attr('action', '{{base_url}}edit_movie/{{no}}');
|
||||
|
||||
$("#movie_title").html($(this).data("title"));
|
||||
$("#movie_poster").attr("src", "{{base_url}}image_proxy_movies" + $(this).data("poster"));
|
||||
|
||||
$("#movie_audio_language").html($(this).data("audio"));
|
||||
|
||||
$('#movie_languages').dropdown('clear');
|
||||
var languages_array = eval($(this).data("languages"));
|
||||
$('#movie_languages').dropdown('set selected',languages_array);
|
||||
|
||||
if ($(this).data("hearing-impaired") == "True") {
|
||||
$("#movie_hearing-impaired_div").checkbox('check');
|
||||
} else {
|
||||
$("#movie_hearing-impaired_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
$('.small.modal').modal('show');
|
||||
})
|
||||
</script>
|
@ -0,0 +1,258 @@
|
||||
<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>Movies - 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;
|
||||
}
|
||||
#tablemovies {
|
||||
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; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<div class="ui basic buttons">
|
||||
<button id="movieseditor" class="ui button"><i class="configure icon"></i>Movies Editor</button>
|
||||
</div>
|
||||
<table id="tablemovies" class="ui very basic selectable sortable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sorted ascending">Name</th>
|
||||
<th>Path</th>
|
||||
<th>Audio language</th>
|
||||
<th>Subtitles languages</th>
|
||||
<th>Hearing-impaired</th>
|
||||
<th class="no-sort"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import ast
|
||||
%import os
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td><a href="{{base_url}}movie/{{row[5]}}">{{row[1]}}</a></td>
|
||||
<td>
|
||||
%if os.path.isfile(row[2]):
|
||||
<span data-tooltip="This path seems to be valid." data-inverted=""><i class="checkmark icon"></i></span>
|
||||
%else:
|
||||
<span data-tooltip="This path doesn't seems to be valid." data-inverted=""><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 {{!"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 movies" data-inverted="" 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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="ui small modal">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">
|
||||
<div id="movies_title"></div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form name="movies_form" id="movies_form" action="" method="post" class="ui form">
|
||||
<div id="divdetails" class="ui grid">
|
||||
<div class="four wide column">
|
||||
<img id="movies_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="movies_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="movies_languages" {{!'multiple="" ' if single_language == 'False' else ''}}class="ui fluid selection dropdown">
|
||||
<option value="">Languages</option>
|
||||
%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="movies_hearing-impaired_div" class="ui toggle checkbox">
|
||||
<input name="hearing_impaired" id="movies_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="movies_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();
|
||||
}
|
||||
|
||||
$('table').tablesort();
|
||||
|
||||
$('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)}}";
|
||||
})
|
||||
|
||||
$('#movieseditor').click(function(){
|
||||
window.location = '{{base_url}}movieseditor';
|
||||
})
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
|
||||
$('.config').click(function(){
|
||||
sessionStorage.scrolly=$(window).scrollTop();
|
||||
|
||||
$('#movies_form').attr('action', '{{base_url}}edit_movie/' + $(this).data("no"));
|
||||
|
||||
$("#movies_title").html($(this).data("title"));
|
||||
$("#movies_poster").attr("src", "{{base_url}}image_proxy_movies" + $(this).data("poster"));
|
||||
|
||||
$("#movies_audio_language").html($(this).data("audio"));
|
||||
|
||||
$('#movies_languages').dropdown('clear');
|
||||
var languages_array = eval($(this).data("languages"));
|
||||
$('#movies_languages').dropdown('set selected',languages_array);
|
||||
|
||||
if ($(this).data("hearing-impaired") == "True") {
|
||||
$("#movies_hearing-impaired_div").checkbox('check');
|
||||
} else {
|
||||
$("#movies_hearing-impaired_div").checkbox('uncheck');
|
||||
}
|
||||
|
||||
$('.small.modal').modal('show');
|
||||
})
|
||||
|
||||
$('#movies_languages').dropdown();
|
||||
</script>
|
@ -0,0 +1,181 @@
|
||||
<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>Movies Editor - 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;
|
||||
}
|
||||
#tablemovies {
|
||||
padding-top: 1em;
|
||||
}
|
||||
#divdetails {
|
||||
min-height: 250px;
|
||||
}
|
||||
#bottommenu {
|
||||
background-color: #333333;
|
||||
box-shadow: 0 0 10px 1px #333;
|
||||
padding: 10px;
|
||||
}
|
||||
#bottomform {
|
||||
width: 100%;
|
||||
padding-left: 8em;
|
||||
margin-bottom: -1em !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
% include('menu.tpl')
|
||||
|
||||
<div id="fondblanc" class="ui container">
|
||||
<table id="tablemovies" class="ui very basic selectable sortable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="no-sort collapsing">
|
||||
<div class="ui checkbox">
|
||||
<input id='selectall' type="checkbox">
|
||||
<label></label>
|
||||
</div>
|
||||
</th>
|
||||
<th class="sorted ascending">Name</th>
|
||||
<th>Audio language</th>
|
||||
<th>Subtitles languages</th>
|
||||
<th>Hearing-impaired</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import ast
|
||||
%import os
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td class="collapsing">
|
||||
<div class="ui checkbox">
|
||||
<input id='{{row[5]}}' type="checkbox" class="selected">
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td><a href="{{base_url}}episodes/{{row[5]}}">{{row[1]}}</a></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>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id='bottommenu' class="ui inverted bottom fixed menu">
|
||||
<form id='bottomform' action="{{base_url}}edit_movieseditor" method="POST" class="ui form">
|
||||
<input type="hidden" name="movies" id="checked" />
|
||||
<div class="fields">
|
||||
<div class="eight wide field">
|
||||
<label style='color: white;'>Subtitles languages</label>
|
||||
<select name="languages" {{!'multiple="" ' if single_language == 'False' else ''}}class="select ui disabled selection dropdown">
|
||||
<option value="">No change</option>
|
||||
<option value="None">None</option>
|
||||
%for language in languages:
|
||||
<option value="{{language[0]}}">{{language[1]}}</option>
|
||||
%end
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label style='color: white;'>Hearing-impaired</label>
|
||||
<select name="hearing_impaired" class="select ui disabled selection dropdown">
|
||||
<option value="">No change</option>
|
||||
<option value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class='field'>
|
||||
<label style='color: white;'><span id='count'>0</span> movies selected</label>
|
||||
<button type="submit" id="save" name="save" value="save" class="ui disabled blue approve button">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
% include('footer.tpl')
|
||||
<br><br><br><br>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
if (sessionStorage.scrolly) {
|
||||
$(window).scrollTop(sessionStorage.scrolly);
|
||||
sessionStorage.clear();
|
||||
}
|
||||
|
||||
$('table').tablesort();
|
||||
|
||||
$('a, button').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.modal')
|
||||
.modal({
|
||||
autofocus: false
|
||||
})
|
||||
;
|
||||
|
||||
$('.selected').change(function() {
|
||||
$("#count").text($('.selected:checked').length);
|
||||
if ( $('.selected:checked').length > 0 ) {
|
||||
$('.select').removeClass('disabled');
|
||||
$('#save').removeClass('disabled');
|
||||
}
|
||||
else {
|
||||
$('.select').addClass('disabled');
|
||||
$('#save').addClass('disabled');
|
||||
}
|
||||
|
||||
var result = [];
|
||||
$('.selected:checked').each(function(i){
|
||||
result.push($(this).attr('id'));
|
||||
});
|
||||
$("#checked").val(result);
|
||||
});
|
||||
|
||||
$('#selectall').change(function() {
|
||||
if ( $('#selectall').is(":checked") ) {
|
||||
$('.selected').prop('checked', true).change();
|
||||
}
|
||||
else {
|
||||
$('.selected').prop('checked', false).change();
|
||||
}
|
||||
});
|
||||
|
||||
$('.select').dropdown();
|
||||
</script>
|
@ -0,0 +1,160 @@
|
||||
<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>Wanted - 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;
|
||||
}
|
||||
#tablehistory {
|
||||
padding-top: 2em;
|
||||
}
|
||||
.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>
|
||||
%import ast
|
||||
%import pycountry
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
|
||||
<div class="ui container">
|
||||
<div class="ui right floated basic buttons">
|
||||
<button id="wanted_search_missing_subtitles_movies" class="ui button"><i class="download icon"></i>Download wanted subtitles</button>
|
||||
</div>
|
||||
<table id="tablehistory" class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Movies</th>
|
||||
<th>Missing subtitles</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import time
|
||||
%import pretty
|
||||
%if len(rows) == 0:
|
||||
<tr>
|
||||
<td colspan="2">No missing movie subtitles.</td>
|
||||
</tr>
|
||||
%end
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<td><a href="{{base_url}}movie/{{row[2]}}">{{row[0]}}</a></td>
|
||||
<td>
|
||||
%missing_languages = ast.literal_eval(row[1])
|
||||
%if missing_languages is not None:
|
||||
%for language in missing_languages:
|
||||
<a data-moviePath="{{row[3]}}" data-sceneName="{{row[5]}}" data-language="{{pycountry.languages.lookup(str(language)).alpha_3}}" data-hi="{{row[4]}}" data-radarrId={{row[2]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
%end
|
||||
%end
|
||||
</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
$('a, button').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
loadURLmovies(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
loadURLmovies({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
loadURLmovies({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
loadURLmovies({{int(max_page)}});
|
||||
})
|
||||
|
||||
$('#wanted_search_missing_subtitles_movies').click(function(){
|
||||
window.location = '{{base_url}}wanted_search_missing_subtitles';
|
||||
})
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
var values = {
|
||||
moviePath: $(this).attr("data-moviePath"),
|
||||
sceneName: $(this).attr("data-sceneName"),
|
||||
language: $(this).attr("data-language"),
|
||||
hi: $(this).attr("data-hi"),
|
||||
radarrId: $(this).attr("data-radarrId")
|
||||
};
|
||||
$('#loader').addClass('active');
|
||||
$.ajax({
|
||||
url: "{{base_url}}get_subtitle_movie",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: values
|
||||
}).always(function () {
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
</script>
|
@ -0,0 +1,168 @@
|
||||
<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>Wanted - 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;
|
||||
}
|
||||
#tablehistory {
|
||||
padding-top: 2em;
|
||||
}
|
||||
.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>
|
||||
%import ast
|
||||
%import pycountry
|
||||
<div id='loader' class="ui page dimmer">
|
||||
<div class="ui indeterminate text loader">Loading...</div>
|
||||
</div>
|
||||
|
||||
<div class="ui container">
|
||||
<div class="ui right floated basic buttons">
|
||||
<button id="wanted_search_missing_subtitles" class="ui button"><i class="download icon"></i>Download wanted subtitles</button>
|
||||
</div>
|
||||
<table id="tablehistory" class="ui very basic selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Series</th>
|
||||
<th>Episode</th>
|
||||
<th>Episode Title</th>
|
||||
<th>Missing subtitles</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%import time
|
||||
%import pretty
|
||||
%if len(rows) == 0:
|
||||
<tr>
|
||||
<td colspan="4">No missing episode subtitles.</td>
|
||||
</tr>
|
||||
%end
|
||||
%for row in rows:
|
||||
<tr class="selectable">
|
||||
<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)}}
|
||||
</td>
|
||||
<td>{{row[2]}}</td>
|
||||
<td>
|
||||
%missing_languages = ast.literal_eval(row[3])
|
||||
%if missing_languages is not None:
|
||||
%for language in missing_languages:
|
||||
<a data-episodePath="{{row[5]}}" data-sceneName="{{row[8]}}" data-language="{{pycountry.languages.lookup(str(language)).alpha_3}}" data-hi="{{row[6]}}" data-sonarrSeriesId={{row[4]}} data-sonarrEpisodeId={{row[7]}} class="get_subtitle ui tiny label">
|
||||
{{language}}
|
||||
<i style="margin-left:3px; margin-right:0px" class="search icon"></i>
|
||||
</a>
|
||||
%end
|
||||
%end
|
||||
</td>
|
||||
</tr>
|
||||
%end
|
||||
</tbody>
|
||||
</table>
|
||||
<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>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
<script>
|
||||
$('a, button').click(function(){
|
||||
$('#loader').addClass('active');
|
||||
})
|
||||
|
||||
$('.fast.backward').click(function(){
|
||||
loadURLseries(1);
|
||||
})
|
||||
$('.backward:not(.fast)').click(function(){
|
||||
loadURLseries({{int(page)-1}});
|
||||
})
|
||||
$('.forward:not(.fast)').click(function(){
|
||||
loadURLseries({{int(page)+1}});
|
||||
})
|
||||
$('.fast.forward').click(function(){
|
||||
loadURLseries({{int(max_page)}});
|
||||
})
|
||||
|
||||
$('#wanted_search_missing_subtitles').click(function(){
|
||||
window.location = '{{base_url}}wanted_search_missing_subtitles';
|
||||
})
|
||||
|
||||
$('.get_subtitle').click(function(){
|
||||
var values = {
|
||||
episodePath: $(this).attr("data-episodePath"),
|
||||
sceneName: $(this).attr("data-sceneName"),
|
||||
language: $(this).attr("data-language"),
|
||||
hi: $(this).attr("data-hi"),
|
||||
sonarrSeriesId: $(this).attr("data-sonarrSeriesId"),
|
||||
sonarrEpisodeId: $(this).attr("data-sonarrEpisodeId")
|
||||
};
|
||||
$('#loader').addClass('active');
|
||||
$.ajax({
|
||||
url: "{{base_url}}get_subtitle",
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
data: values
|
||||
}).always(function () {
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
</script>
|
Loading…
Reference in new issue