1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-24 16:52:06 +00:00
bazarr/views/historymovies.html

232 lines
7.2 KiB
HTML
Raw Normal View History

2019-04-20 21:15:00 +00:00
<!DOCTYPE html>
<html lang="en">
2018-05-02 10:25:42 +00:00
<head>
<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;
}
.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;
}
.label, .value {
color: white !important;
}
</style>
</head>
<body>
<div id='loader' class="ui page dimmer">
<div id="loader_text" class="ui indeterminate text loader">Loading...</div>
2018-05-02 10:25:42 +00:00
</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>
2019-03-19 04:08:53 +00:00
%import ast
2018-05-02 10:25:42 +00:00
%import time
%import pretty
%for row in rows:
<tr class="selectable">
<td class="collapsing">
2019-10-28 00:45:15 +00:00
%if row['action'] == 0:
2019-09-17 14:03:35 +00:00
<div class="ui inverted basic compact icon" data-tooltip="Subtitle file has been erased." data-inverted="" data-position="top left">
2018-05-02 10:25:42 +00:00
<i class="ui trash icon"></i>
</div>
2019-10-28 00:45:15 +00:00
%elif row['action'] == 1:
2019-09-17 14:03:35 +00:00
<div class="ui inverted basic compact icon" data-tooltip="Subtitle file has been downloaded." data-inverted="" data-position="top left">
2018-05-02 10:25:42 +00:00
<i class="ui download icon"></i>
</div>
2019-10-28 00:45:15 +00:00
%elif row['action'] == 2:
2019-09-17 14:03:35 +00:00
<div class="ui inverted basic compact icon" data-tooltip="Subtitle file has been manually downloaded." data-inverted="" data-position="top left">
2019-03-19 04:08:53 +00:00
<i class="ui user icon"></i>
</div>
2019-10-28 00:45:15 +00:00
%elif row['action'] == 3:
2019-09-17 14:03:35 +00:00
<div class="ui inverted basic compact icon" data-tooltip="Subtitle file has been upgraded." data-inverted="" data-position="top left">
2019-03-19 04:08:53 +00:00
<i class="ui recycle icon"></i>
</div>
2019-10-28 00:45:15 +00:00
%elif row['action'] == 4:
2019-09-17 14:03:35 +00:00
<div class="ui inverted basic compact icon" data-tooltip="Subtitle file has been manually uploaded." data-inverted="" data-position="top left">
<i class="ui cloud upload icon"></i>
</div>
2018-05-02 10:25:42 +00:00
%end
</td>
<td>
2019-10-28 00:45:15 +00:00
<a href="{{base_url}}movie/{{row['radarrId']}}">{{row['title']}}</a>
2018-05-02 10:25:42 +00:00
</td>
<td class="collapsing">
2019-10-28 00:45:15 +00:00
<div class="ui inverted" data-tooltip="{{time.strftime('%Y/%m/%d %H:%M', time.localtime(row['timestamp']))}}" data-inverted="" data-position="top left">
{{pretty.date(int(row['timestamp']))}}
2018-05-02 10:25:42 +00:00
</div>
</td>
2019-03-19 04:08:53 +00:00
<td>
2019-10-30 22:07:39 +00:00
% upgradable_criteria = dict([('timestamp', row['timestamp']), ('video_path', row['video_path']), ('score', row['score'])])
2019-03-19 04:08:53 +00:00
% if upgradable_criteria in upgradable_movies:
2019-10-28 00:45:15 +00:00
% if row['languages'] != "None":
% desired_languages = ast.literal_eval(str(row['languages']))
% if row['forced'] == "True":
2019-05-10 13:24:11 +00:00
% forced_languages = [l + ":forced" for l in desired_languages]
2019-10-28 00:45:15 +00:00
% elif row['forced'] == "Both":
2019-05-10 13:24:11 +00:00
% forced_languages = [l + ":forced" for l in desired_languages] + desired_languages
% else:
% forced_languages = desired_languages
% end
2019-10-28 00:45:15 +00:00
% if row['languages'] and row['language'] and row['language'] in forced_languages:
2019-09-17 14:03:35 +00:00
<div class="ui inverted basic compact icon" data-tooltip="This Subtitle file is eligible for an upgrade." data-inverted="" data-position="top left">
2019-10-28 00:45:15 +00:00
<i class="ui green recycle icon upgrade"></i>{{row['description']}}
2019-05-10 13:24:11 +00:00
</div>
% else:
2019-10-28 00:45:15 +00:00
{{row['description']}}
2019-05-10 13:24:11 +00:00
% end
% end
2019-03-19 04:08:53 +00:00
% else:
2019-10-28 00:45:15 +00:00
{{row['description']}}
% end
2019-03-19 04:08:53 +00:00
</td>
2018-05-02 10:25:42 +00:00
</tr>
%end
</tbody>
</table>
2018-07-13 12:15:44 +00:00
%try: page_size
%except NameError: page_size = "25"
2018-07-13 12:21:45 +00:00
%end
%if page_size != -1:
2018-05-02 10:25:42 +00:00
<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>
2019-09-17 14:03:35 +00:00
<div class="right floated right aligned column">Total Records: {{row_count}}</div>
2018-05-02 10:25:42 +00:00
</div>
</div>
%end
2018-05-02 10:25:42 +00:00
</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>
2019-09-17 14:03:35 +00:00
Statistics
2018-05-02 10:25:42 +00:00
</div>
<div class="label">
</div>
</div>
<div class="statistic">
<div class="value">
{{stats[0]}}
</div>
<div class="label">
2019-09-17 14:03:35 +00:00
In 24 Hours
2018-05-02 10:25:42 +00:00
</div>
</div>
<div class="statistic">
<div class="value">
{{stats[1]}}
</div>
<div class="label">
2019-09-17 14:03:35 +00:00
In One Week
2018-05-02 10:25:42 +00:00
</div>
</div>
<div class="statistic">
<div class="value">
{{stats[2]}}
</div>
<div class="label">
2019-09-17 14:03:35 +00:00
In One Year
2018-05-02 10:25:42 +00:00
</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();
}
2019-03-22 00:26:48 +00:00
$('a').on('click', function(){
2018-05-02 10:25:42 +00:00
sessionStorage.scrolly=$(window).scrollTop();
$('#loader').addClass('active');
});
2018-05-02 10:25:42 +00:00
$('.fast.backward').on('click', function(){
2019-04-30 18:52:18 +00:00
loadURLmovies(1);
});
$('.backward:not(.fast)').on('click', function(){
2019-04-30 18:52:18 +00:00
loadURLmovies({{int(page)-1}});
});
$('.forward:not(.fast)').on('click', function(){
2019-04-30 18:52:18 +00:00
loadURLmovies({{int(page)+1}});
});
$('.fast.forward').on('click', function(){
2019-04-30 18:52:18 +00:00
loadURLmovies({{int(max_page)}});
});
</script>