2022.11.12 (01. bug fixed)
This commit is contained in:
@@ -1,175 +1,231 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
{{ macros.m_button_group([['reset_btn', '초기화'], ['delete_completed_btn', '완료 목록 삭제'], ['go_ffmpeg_btn', 'Go FFMPEG']]) }}
|
||||
</div>
|
||||
<table id="result_table" class="table table-sm tableRowHover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th style="width:5%; text-align:center;">IDX</th>
|
||||
<th style="width:8%; text-align:center;">Plugin</th>
|
||||
<th style="width:10%; text-align:center;">시작시간</th>
|
||||
<th style="width:20%; text-align:center;">파일명</th>
|
||||
<th style="width:8%; text-align:center;">상태</th>
|
||||
<th style="width:15%; text-align:center;">진행률</th>
|
||||
<th style="width:5%; text-align:center;">길이</th>
|
||||
<th style="width:5%; text-align:center;">PF</th>
|
||||
<th style="width:8%; text-align:center;">배속</th>
|
||||
<th style="width:8%; text-align:center;">진행시간</th>
|
||||
<th style="width:8%; text-align:center;">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list"></tbody>
|
||||
</table>
|
||||
|
||||
<table id="result_table" class="table table-sm tableRowHover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th style="width:5%; text-align:center;">IDX</th>
|
||||
<th style="width:8%; text-align:center;">Plugin</th>
|
||||
<th style="width:10%; text-align:center;">시작시간</th>
|
||||
<th style="width:20%; text-align:center;">파일명</th>
|
||||
<th style="width:8%; text-align:center;">상태</th>
|
||||
<th style="width:15%; text-align:center;">진행률</th>
|
||||
<th style="width:5%; text-align:center;">길이</th>
|
||||
<th style="width:5%; text-align:center;">PF</th>
|
||||
<th style="width:8%; text-align:center;">배속</th>
|
||||
<th style="width:8%; text-align:center;">진행시간</th>
|
||||
<th style="width:8%; text-align:center;">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list"></tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
const package_name = "{{arg['package_name'] }}";
|
||||
const sub = "{{arg['sub'] }}";
|
||||
|
||||
<script type="text/javascript">
|
||||
function on_start() {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/entity_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
make_download_list(data)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
var socket = io.connect(window.location.href);
|
||||
$(document).ready(function () {
|
||||
const socket = io.connect(window.location.href);
|
||||
|
||||
socket.on('on_start', function(data){
|
||||
document.getElementById("log").innerHTML += data.data;
|
||||
document.getElementById("log").scrollTop = document.getElementById("log").scrollHeight;
|
||||
document.getElementById("log").style.visibility = 'visible';
|
||||
$('#loading').hide();
|
||||
});
|
||||
{#socket = io.connect(window.location.protocol + "//" + document.domain + ":" + location.port + "/" + package_name + '/' + sub);#}
|
||||
|
||||
socket.on('add', function(data){
|
||||
str = make_item(data);
|
||||
if (current_data == null || current_data.length == 0) {
|
||||
current_data = Array();
|
||||
$("#list").html(str);
|
||||
} else {
|
||||
$("#list").html($("#list").html() + str);
|
||||
}
|
||||
current_data.push(data);
|
||||
});
|
||||
socket.on('start', function (data) {
|
||||
on_start();
|
||||
});
|
||||
socket.on('list_refresh', function (data) {
|
||||
on_start()
|
||||
});
|
||||
|
||||
socket.on('status_change', function(data) {
|
||||
button_html(data);
|
||||
});
|
||||
socket.on('status', function (data) {
|
||||
console.log(data);
|
||||
on_status(data)
|
||||
});
|
||||
|
||||
socket.on('status', function(data){
|
||||
status_html(data);
|
||||
});
|
||||
socket.on('on_start', function (data) {
|
||||
document.getElementById("log").innerHTML += data.data;
|
||||
document.getElementById("log").scrollTop = document.getElementById("log").scrollHeight;
|
||||
document.getElementById("log").style.visibility = 'visible';
|
||||
$('#loading').hide();
|
||||
});
|
||||
|
||||
socket.on('last', function(data){
|
||||
status_html(data);
|
||||
button_html(data);
|
||||
});
|
||||
socket.on('add', function (data) {
|
||||
str = make_item(data);
|
||||
if (current_data == null || current_data.length == 0) {
|
||||
current_data = Array();
|
||||
$("#list").html(str);
|
||||
} else {
|
||||
$("#list").html($("#list").html() + str);
|
||||
}
|
||||
current_data.push(data);
|
||||
});
|
||||
|
||||
globalSendCommand('list', null, null, null, function(data) {
|
||||
current_data = data;
|
||||
$("#list").html('');
|
||||
console.log(data)
|
||||
if (data.length == 0) {
|
||||
str = "<tr><td colspan='10'><h4>작업이 없습니다.</h4><td><tr>";
|
||||
} else {
|
||||
str = ''
|
||||
for(i in data) {
|
||||
str += make_item(data[i]);
|
||||
}
|
||||
}
|
||||
$("#list").html(str);
|
||||
});
|
||||
});
|
||||
socket.on('status_change', function (data) {
|
||||
button_html(data);
|
||||
});
|
||||
|
||||
socket.on('status', function (data) {
|
||||
status_html(data);
|
||||
});
|
||||
|
||||
socket.on('last', function (data) {
|
||||
status_html(data);
|
||||
button_html(data);
|
||||
});
|
||||
|
||||
globalSendCommand('list', null, null, null, function (data) {
|
||||
current_data = data;
|
||||
$("#list").html('');
|
||||
console.log(data)
|
||||
if (data.length == 0) {
|
||||
str = "<tr><td colspan='10'><h4>작업이 없습니다.</h4><td><tr>";
|
||||
} else {
|
||||
str = ''
|
||||
for (i in data) {
|
||||
str += make_item(data[i]);
|
||||
}
|
||||
}
|
||||
$("#list").html(str);
|
||||
});
|
||||
|
||||
|
||||
$("body").on('click', '#stop_btn', function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
globalSendCommand('stop', $(this).data('idx'), null, null, function(ret){
|
||||
refresh_item(ret.data);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function refresh_item(data) {
|
||||
$('#tr1_'+data.idx).html(make_item1(data));
|
||||
$('#collapse_'+data.idx).html(make_item2(data));
|
||||
}
|
||||
|
||||
function make_item(data) {
|
||||
str = '<tr id="tr1_'+data.idx+'" style="cursor: pointer;" data-toggle="collapse" data-target="#collapse_'+ data.idx + '" aria-expanded="true" >';
|
||||
str += make_item1(data);
|
||||
str += '</tr>';
|
||||
str += '<tr class="collapse tableRowHoverOff" style="cursor: pointer;" id="collapse_' + data.idx + '">';
|
||||
str += make_item2(data);
|
||||
str += '</tr>';
|
||||
return str;
|
||||
}
|
||||
|
||||
function make_item1(data) {
|
||||
//console.log(data);
|
||||
str = '';
|
||||
str += '<td scope="col" style="width:5%; text-align:center;">'+ data.idx + '</td>';
|
||||
str += '<td scope="col" style="width:8%; text-align:center;">'+ data.callback_id + '</td>';
|
||||
str += '<td scope="col" style="width:10%; text-align:center;">'+ data.start_time + '</td>';
|
||||
str += '<td scope="col" style="width:20%; text-align:center;">'+ data.filename + '</td>';
|
||||
str += '<td id="status_'+data.idx+'" scope="col" style="width:8%; text-align:center;">'+ data.status_kor + '</td>';
|
||||
var visi = 'hidden';
|
||||
if (parseInt(data.percent) > 0) {
|
||||
visi = 'visible';
|
||||
}
|
||||
str += '<td scope="col" style="width:20%; text-align:center;"><div class="progress"><div id="progress_'+data.idx+'" class="progress-bar" style="visibility: '+visi+'; width:'+data.percent+'%">'+data.percent +'%</div></div></td>';
|
||||
str += '<td scope="col" style="width:5%; text-align:center;">'+ data.duration_str + '</td>';
|
||||
str += '<td id="current_pf_count_'+data.idx+'" scope="col" style="width:5%; text-align:center;">'+ data.current_pf_count + '</td>';
|
||||
str += '<td id="current_speed_'+data.idx+'" scope="col" style="width:8%; text-align:center;">'+ data.current_speed + '</td>';
|
||||
str += '<td id="download_time_'+data.idx+'" scope="col" style="width:8%; text-align:center;">'+ data.download_time + '</td>';
|
||||
str += '<td id="button_'+data.idx+'" scope="col" style="width:8%; text-align:center;">';
|
||||
if (data.status_str == 'DOWNLOADING') {
|
||||
str += j_button('stop_btn', '중지', {'idx':data.idx}, 'danger', false, false);
|
||||
}
|
||||
str += '</td>'
|
||||
return str;
|
||||
}
|
||||
|
||||
function make_item2(data) {
|
||||
str = '';
|
||||
str += '<td colspan="11">';
|
||||
str += '<div id="detail_'+data.idx+'">';
|
||||
str += get_detail(data);
|
||||
str += '</div>';
|
||||
str += '</td>';
|
||||
return str
|
||||
}
|
||||
$("body").on('click', '#stop_btn', function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
globalSendCommand('stop', $(this).data('idx'), null, null, function (ret) {
|
||||
refresh_item(ret.data);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function get_detail(data) {
|
||||
var str = j_row_info('URL', data.url);
|
||||
str += j_row_info('임시경로', data.temp_fullpath);
|
||||
str += j_row_info('저장경로', data.save_fullpath);
|
||||
str += j_row_info('진행률(current/total)', data.percent+ '% (' + data.current_duration + ' / ' + data.duration + ')');
|
||||
str += j_row_info('현재 비트레이트', data.current_bitrate);
|
||||
str += j_row_info('종료시간', data.end_time);
|
||||
str += j_row_info('허용 Packet Fail 수', data.max_pf_count);
|
||||
str += j_row_info('파일 Exist', data.exist);
|
||||
if (data.status_str == 'COMPLETED') {
|
||||
str += j_row_info('파일 크기', data.filesize_str);
|
||||
str += j_row_info('다운 속도', data.download_speed);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function refresh_item(data) {
|
||||
$('#tr1_' + data.idx).html(make_item1(data));
|
||||
$('#collapse_' + data.idx).html(make_item2(data));
|
||||
}
|
||||
|
||||
function button_html(data) {
|
||||
//console.log(data)
|
||||
str = '';
|
||||
if (data.status_str == 'DOWNLOADING') {
|
||||
str = j_button('stop_btn', '중지', {'idx':data.idx}, 'danger', false, false);
|
||||
}
|
||||
$("#button_" + data.idx).html(str);
|
||||
}
|
||||
function make_item(data) {
|
||||
str = '<tr id="tr1_' + data.idx + '" style="cursor: pointer;" data-toggle="collapse" data-target="#collapse_' + data.idx + '" aria-expanded="true" >';
|
||||
str += make_item1(data);
|
||||
str += '</tr>';
|
||||
str += '<tr class="collapse tableRowHoverOff" style="cursor: pointer;" id="collapse_' + data.idx + '">';
|
||||
str += make_item2(data);
|
||||
str += '</tr>';
|
||||
return str;
|
||||
}
|
||||
|
||||
function status_html(data) {
|
||||
var progress = document.getElementById("progress_" + data.idx);
|
||||
progress.style.width = data.percent+ '%';
|
||||
progress.innerHTML = data.percent+ '%';
|
||||
progress.style.visibility = 'visible';
|
||||
document.getElementById("status_" + data.idx).innerHTML = data.status_kor;
|
||||
document.getElementById("current_pf_count_" + data.idx).innerHTML = data.current_pf_count;
|
||||
document.getElementById("current_speed_" + data.idx).innerHTML = data.current_speed;
|
||||
document.getElementById("download_time_" + data.idx).innerHTML = data.download_time;
|
||||
document.getElementById("detail_" + data.idx).innerHTML = get_detail(data);
|
||||
}
|
||||
function make_item1(data) {
|
||||
//console.log(data);
|
||||
str = '';
|
||||
str += '<td scope="col" style="width:5%; text-align:center;">' + data.idx + '</td>';
|
||||
str += '<td scope="col" style="width:8%; text-align:center;">' + data.callback_id + '</td>';
|
||||
str += '<td scope="col" style="width:10%; text-align:center;">' + data.start_time + '</td>';
|
||||
str += '<td scope="col" style="width:20%; text-align:center;">' + data.filename + '</td>';
|
||||
str += '<td id="status_' + data.idx + '" scope="col" style="width:8%; text-align:center;">' + data.status_kor + '</td>';
|
||||
var visi = 'hidden';
|
||||
if (parseInt(data.percent) > 0) {
|
||||
visi = 'visible';
|
||||
}
|
||||
str += '<td scope="col" style="width:20%; text-align:center;"><div class="progress"><div id="progress_' + data.idx + '" class="progress-bar" style="visibility: ' + visi + '; width:' + data.percent + '%">' + data.percent + '%</div></div></td>';
|
||||
str += '<td scope="col" style="width:5%; text-align:center;">' + data.duration_str + '</td>';
|
||||
str += '<td id="current_pf_count_' + data.idx + '" scope="col" style="width:5%; text-align:center;">' + data.current_pf_count + '</td>';
|
||||
str += '<td id="current_speed_' + data.idx + '" scope="col" style="width:8%; text-align:center;">' + data.current_speed + '</td>';
|
||||
str += '<td id="download_time_' + data.idx + '" scope="col" style="width:8%; text-align:center;">' + data.download_time + '</td>';
|
||||
str += '<td id="button_' + data.idx + '" scope="col" style="width:8%; text-align:center;">';
|
||||
if (data.status_str == 'DOWNLOADING') {
|
||||
str += j_button('stop_btn', '중지', {'idx': data.idx}, 'danger', false, false);
|
||||
}
|
||||
str += '</td>'
|
||||
return str;
|
||||
}
|
||||
|
||||
</script>
|
||||
function make_item2(data) {
|
||||
str = '';
|
||||
str += '<td colspan="11">';
|
||||
str += '<div id="detail_' + data.idx + '">';
|
||||
str += get_detail(data);
|
||||
str += '</div>';
|
||||
str += '</td>';
|
||||
return str
|
||||
}
|
||||
|
||||
|
||||
function get_detail(data) {
|
||||
var str = j_row_info('URL', data.url);
|
||||
str += j_row_info('임시경로', data.temp_fullpath);
|
||||
str += j_row_info('저장경로', data.save_fullpath);
|
||||
str += j_row_info('진행률(current/total)', data.percent + '% (' + data.current_duration + ' / ' + data.duration + ')');
|
||||
str += j_row_info('현재 비트레이트', data.current_bitrate);
|
||||
str += j_row_info('종료시간', data.end_time);
|
||||
str += j_row_info('허용 Packet Fail 수', data.max_pf_count);
|
||||
str += j_row_info('파일 Exist', data.exist);
|
||||
if (data.status_str == 'COMPLETED') {
|
||||
str += j_row_info('파일 크기', data.filesize_str);
|
||||
str += j_row_info('다운 속도', data.download_speed);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function button_html(data) {
|
||||
//console.log(data)
|
||||
str = '';
|
||||
if (data.status_str == 'DOWNLOADING') {
|
||||
str = j_button('stop_btn', '중지', {'idx': data.idx}, 'danger', false, false);
|
||||
}
|
||||
$("#button_" + data.idx).html(str);
|
||||
}
|
||||
|
||||
function status_html(data) {
|
||||
var progress = document.getElementById("progress_" + data.idx);
|
||||
progress.style.width = data.percent + '%';
|
||||
progress.innerHTML = data.percent + '%';
|
||||
progress.style.visibility = 'visible';
|
||||
document.getElementById("status_" + data.idx).innerHTML = data.status_kor;
|
||||
document.getElementById("current_pf_count_" + data.idx).innerHTML = data.current_pf_count;
|
||||
document.getElementById("current_speed_" + data.idx).innerHTML = data.current_speed;
|
||||
document.getElementById("download_time_" + data.idx).innerHTML = data.download_time;
|
||||
document.getElementById("detail_" + data.idx).innerHTML = get_detail(data);
|
||||
}
|
||||
|
||||
$("body").on('click', '#reset_btn', function (e) {
|
||||
e.preventDefault();
|
||||
entity_id = $(this).data('id')
|
||||
send_data = {'command': 'reset', 'entity_id': -1}
|
||||
queue_command(send_data)
|
||||
});
|
||||
|
||||
function queue_command(data) {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/queue_command',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret == 'notify') {
|
||||
$.notify('<strong>' + ret.log + '</strong>', {type: 'warning'});
|
||||
}
|
||||
on_start();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -222,6 +222,7 @@
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#loader").css("display", 'none')
|
||||
console.log({{ arg['code'] }})
|
||||
// console.log('wr_id::', params.wr_id)
|
||||
|
||||
|
||||
|
||||
@@ -187,6 +187,7 @@
|
||||
// {# '<span data-tooltip-text="'+data.episode[i].title+'">' + data.episode[i].code + '</span></button></div>';#}
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + '</h5>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + '</p>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].epx + '</p>';
|
||||
tmp += '<a href="./request?code=' + data.anime_list[i].code + '" class="btn btn-primary cut-text">' + data.anime_list[i].title + '</a>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
@@ -247,6 +248,7 @@
|
||||
// {# '<span data-tooltip-text="'+data.episode[i].title+'">' + data.episode[i].code + '</span></button></div>';#}
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + '</h5>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + '</p>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].epx + '</p>';
|
||||
tmp += '<a href="' + request_url + '" class="btn btn-primary cut-text">' + data.anime_list[i].title + '</a>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
@@ -602,254 +604,261 @@
|
||||
max-width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[data-tooltip-text]:hover {
|
||||
position: relative;
|
||||
}
|
||||
[data-tooltip-text]:hover {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[data-tooltip-text]:after {
|
||||
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
-moz-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
[data-tooltip-text]:after {
|
||||
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
-moz-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
|
||||
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px 12px;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
min-width: 50px;
|
||||
max-width: 300px;
|
||||
word-wrap: break-word;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px 12px;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
min-width: 50px;
|
||||
max-width: 300px;
|
||||
word-wrap: break-word;
|
||||
|
||||
z-index: 9999;
|
||||
z-index: 9999;
|
||||
|
||||
opacity: 0;
|
||||
left: -9999px;
|
||||
top: 90%;
|
||||
opacity: 0;
|
||||
left: -9999px;
|
||||
top: 90%;
|
||||
|
||||
content: attr(data-tooltip-text);
|
||||
}
|
||||
content: attr(data-tooltip-text);
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover:after {
|
||||
top: 230%;
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
[data-tooltip-text]:hover:after {
|
||||
top: 230%;
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover {
|
||||
position: relative;
|
||||
}
|
||||
[data-tooltip-text]:hover {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[data-tooltip-text]:after {
|
||||
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
-moz-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
[data-tooltip-text]:after {
|
||||
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
-moz-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
|
||||
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px 12px;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
min-width: 50px;
|
||||
max-width: 300px;
|
||||
word-wrap: break-word;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px 12px;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
min-width: 50px;
|
||||
max-width: 300px;
|
||||
word-wrap: break-word;
|
||||
|
||||
z-index: 9999;
|
||||
z-index: 9999;
|
||||
|
||||
opacity: 0;
|
||||
left: -9999px;
|
||||
top: -210% !important;
|
||||
opacity: 0;
|
||||
left: -9999px;
|
||||
top: -210% !important;
|
||||
|
||||
content: attr(data-tooltip-text);
|
||||
}
|
||||
content: attr(data-tooltip-text);
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover:after {
|
||||
top: 130%;
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
[data-tooltip-text]:hover:after {
|
||||
top: 130%;
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#airing_list {
|
||||
display: none;
|
||||
}
|
||||
#airing_list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cut-text {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
.cut-text {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#screen_movie_list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.btn {
|
||||
white-space: normal !important;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
#screen_movie_list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
padding: 1rem !important;
|
||||
}
|
||||
.card-body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
button#add_whitelist {
|
||||
float: right;
|
||||
}
|
||||
.card-title {
|
||||
padding: 1rem !important;
|
||||
}
|
||||
|
||||
button.btn-favorite {
|
||||
background-color: #e0ff42;
|
||||
}
|
||||
button#add_whitelist {
|
||||
float: right;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: NanumSquareNeo, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Noto Sans, Liberation Sans, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
||||
}
|
||||
button.btn-favorite {
|
||||
background-color: #e0ff42;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: linear-gradient(90deg, #233f48, #6c6fa2, #768dae);
|
||||
}
|
||||
body {
|
||||
font-family: NanumSquareNeo, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Noto Sans, Liberation Sans, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
||||
}
|
||||
|
||||
.demo {
|
||||
width: 100px;
|
||||
height: 102px;
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: calc(50% - 50px);
|
||||
}
|
||||
body {
|
||||
background-image: linear-gradient(90deg, #233f48, #6c6fa2, #768dae);
|
||||
}
|
||||
|
||||
.circle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
.demo {
|
||||
width: 100px;
|
||||
height: 102px;
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: calc(50% - 50px);
|
||||
}
|
||||
|
||||
.circle .inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 100%;
|
||||
border: 5px solid rgba(0, 255, 170, 0.7);
|
||||
border-right: none;
|
||||
border-top: none;
|
||||
backgroudn-clip: padding;
|
||||
box-shadow: inset 0px 0px 10px rgba(0, 255, 170, 0.15);
|
||||
}
|
||||
.circle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.circle .inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 100%;
|
||||
border: 5px solid rgba(0, 255, 170, 0.7);
|
||||
border-right: none;
|
||||
border-top: none;
|
||||
backgroudn-clip: padding;
|
||||
box-shadow: inset 0px 0px 10px rgba(0, 255, 170, 0.15);
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.circle:nth-of-type(0) {
|
||||
@-webkit-keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.circle:nth-of-type(0) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.circle:nth-of-type(1) {
|
||||
transform: rotate(70deg);
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.circle:nth-of-type(1) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.circle:nth-of-type(2) {
|
||||
transform: rotate(140deg);
|
||||
}
|
||||
.circle:nth-of-type(0) {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.circle:nth-of-type(2) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
.circle:nth-of-type(0) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
.demo {
|
||||
-webkit-animation: spin 5s infinite linear;
|
||||
animation: spin 5s infinite linear;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
background: radial-gradient(#222, #000);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
/*position: fixed;*/
|
||||
right: 0;
|
||||
/*top: 0;*/
|
||||
z-index: 99999;
|
||||
opacity: 0.5;
|
||||
margin: 0 auto;
|
||||
transform: translate(-50%, -50%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
.circle:nth-of-type(1) {
|
||||
transform: rotate(70deg);
|
||||
}
|
||||
|
||||
}
|
||||
.circle:nth-of-type(1) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
.loader-inner {
|
||||
bottom: 0;
|
||||
height: 60px;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100px;
|
||||
}
|
||||
.circle:nth-of-type(2) {
|
||||
transform: rotate(140deg);
|
||||
}
|
||||
|
||||
.circle:nth-of-type(2) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
.demo {
|
||||
-webkit-animation: spin 5s infinite linear;
|
||||
animation: spin 5s infinite linear;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
background: radial-gradient(#222, #000);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
/*position: fixed;*/
|
||||
right: 0;
|
||||
/*top: 0;*/
|
||||
z-index: 99999;
|
||||
opacity: 0.5;
|
||||
margin: 0 auto;
|
||||
transform: translate(-50%, -50%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
||||
}
|
||||
|
||||
.loader-inner {
|
||||
bottom: 0;
|
||||
height: 60px;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#preloader {
|
||||
/*background-color: green;*/
|
||||
/*color: white;*/
|
||||
/*height: 100vh;*/
|
||||
/*width: 100%;*/
|
||||
/*position: fixed;*/
|
||||
/*z-index: 100;*/
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
background: radial-gradient(#222, #000);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 99999;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#preloader {
|
||||
/*background-color: green;*/
|
||||
/*color: white;*/
|
||||
/*height: 100vh;*/
|
||||
/*width: 100%;*/
|
||||
/*position: fixed;*/
|
||||
/*z-index: 100;*/
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
background: radial-gradient(#222, #000);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 99999;
|
||||
opacity: 0.5;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<span class="col-md-4">
|
||||
<select id="order" name="order" class="form-control form-control-sm">
|
||||
<option value="desc">최근순</option>
|
||||
<option value="asc">오래된순</option>
|
||||
<option value="asc">오래된 순</option>
|
||||
</select>
|
||||
<select id="option" name="option" class="form-control form-control-sm">
|
||||
<option value="all">전체</option>
|
||||
@@ -34,18 +34,23 @@
|
||||
<div id='page2'></div>
|
||||
</div>
|
||||
|
||||
{# <script src="{{ url_for('.static', filename='js/sjva_global1.js') }}"></script>#}
|
||||
{# <script src="{{ url_for('.static', filename='js/sjva_ui14.js') }}"></script>#}
|
||||
<script type="text/javascript">
|
||||
var package_name = "{{arg['package_name']}}";
|
||||
var sub = "{{arg['sub']}}";
|
||||
var current_data = null;
|
||||
|
||||
$(document).ready(function(){
|
||||
global_sub_request_search('1');
|
||||
{#global_sub_request_search('1');#}
|
||||
console.log('ready')
|
||||
globalRequestSearch2('1');
|
||||
});
|
||||
|
||||
$("#search").click(function(e) {
|
||||
e.preventDefault();
|
||||
global_sub_request_search('1');
|
||||
{#global_sub_request_search('1');#}
|
||||
globalRequestSearch2('1');
|
||||
});
|
||||
|
||||
$("body").on('click', '#page', function(e){
|
||||
|
||||
@@ -1,175 +1,141 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
{{ macros.m_button_group([['reset_btn', '초기화'], ['delete_completed_btn', '완료 목록 삭제'], ['go_ffmpeg_btn', 'Go FFMPEG']]) }}
|
||||
{{ macros.m_row_start('0') }}
|
||||
{{ macros.m_row_end() }}
|
||||
{{ macros.m_hr_head_top() }}
|
||||
{{ macros.m_row_start('0') }}
|
||||
{{ macros.m_col(1, macros.m_strong('Idx')) }}
|
||||
{{ macros.m_col(2, macros.m_strong('CreatedTime')) }}
|
||||
{{ macros.m_col(4, macros.m_strong('Filename')) }}
|
||||
{{ macros.m_col(3, macros.m_strong('Status')) }}
|
||||
{{ macros.m_col(2, macros.m_strong('Action')) }}
|
||||
{{ macros.m_row_end() }}
|
||||
{{ macros.m_hr_head_bottom() }}
|
||||
<div id="download_list_div"></div>
|
||||
</div> <!--전체-->
|
||||
|
||||
<table id="result_table" class="table table-sm tableRowHover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th style="width:5%; text-align:center;">IDX</th>
|
||||
<th style="width:8%; text-align:center;">Plugin</th>
|
||||
<th style="width:10%; text-align:center;">시작시간</th>
|
||||
<th style="width:20%; text-align:center;">파일명</th>
|
||||
<th style="width:8%; text-align:center;">상태</th>
|
||||
<th style="width:15%; text-align:center;">진행률</th>
|
||||
<th style="width:5%; text-align:center;">길이</th>
|
||||
<th style="width:5%; text-align:center;">PF</th>
|
||||
<th style="width:8%; text-align:center;">배속</th>
|
||||
<th style="width:8%; text-align:center;">진행시간</th>
|
||||
<th style="width:8%; text-align:center;">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list"></tbody>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
var socket = io.connect(window.location.href);
|
||||
|
||||
socket.on('on_start', function(data){
|
||||
document.getElementById("log").innerHTML += data.data;
|
||||
document.getElementById("log").scrollTop = document.getElementById("log").scrollHeight;
|
||||
document.getElementById("log").style.visibility = 'visible';
|
||||
$('#loading').hide();
|
||||
});
|
||||
|
||||
socket.on('add', function(data){
|
||||
str = make_item(data);
|
||||
if (current_data == null || current_data.length == 0) {
|
||||
current_data = Array();
|
||||
$("#list").html(str);
|
||||
} else {
|
||||
$("#list").html($("#list").html() + str);
|
||||
}
|
||||
current_data.push(data);
|
||||
});
|
||||
|
||||
socket.on('status_change', function(data) {
|
||||
button_html(data);
|
||||
});
|
||||
|
||||
socket.on('status', function(data){
|
||||
status_html(data);
|
||||
});
|
||||
|
||||
socket.on('last', function(data){
|
||||
status_html(data);
|
||||
button_html(data);
|
||||
});
|
||||
|
||||
globalSendCommand('list', null, null, null, function(data) {
|
||||
current_data = data;
|
||||
$("#list").html('');
|
||||
console.log(data)
|
||||
if (data.length == 0) {
|
||||
str = "<tr><td colspan='10'><h4>작업이 없습니다.</h4><td><tr>";
|
||||
} else {
|
||||
str = ''
|
||||
for(i in data) {
|
||||
str += make_item(data[i]);
|
||||
}
|
||||
}
|
||||
$("#list").html(str);
|
||||
});
|
||||
});
|
||||
<script type="text/javascript">
|
||||
var package_name = "{{arg['package_name'] }}";
|
||||
var sub = "{{arg['sub'] }}";
|
||||
var current_data = null;
|
||||
{#socket = io.connect(window.location.protocol + "//" + document.domain + ":" + location.port + "/" + package_name + '/' + sub);#}
|
||||
|
||||
|
||||
$("body").on('click', '#stop_btn', function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
globalSendCommand('stop', $(this).data('idx'), null, null, function(ret){
|
||||
refresh_item(ret.data);
|
||||
});
|
||||
});
|
||||
$(document).ready(function () {
|
||||
console.log(window.location.href)
|
||||
var socket = io.connect(window.location.href);
|
||||
console.log(socket)
|
||||
socket.on('on_start', (data) => {
|
||||
console.log('on_start().............')
|
||||
console.log(data)
|
||||
})
|
||||
socket.on('start', function (data) {
|
||||
console.log('socket start()')
|
||||
on_start();
|
||||
});
|
||||
socket.on('list_refresh', function (data) {
|
||||
on_start()
|
||||
});
|
||||
|
||||
socket.on('status', function (data) {
|
||||
console.log(data);
|
||||
on_status(data)
|
||||
});
|
||||
|
||||
|
||||
function refresh_item(data) {
|
||||
$('#tr1_'+data.idx).html(make_item1(data));
|
||||
$('#collapse_'+data.idx).html(make_item2(data));
|
||||
}
|
||||
|
||||
function make_item(data) {
|
||||
str = '<tr id="tr1_'+data.idx+'" style="cursor: pointer;" data-toggle="collapse" data-target="#collapse_'+ data.idx + '" aria-expanded="true" >';
|
||||
str += make_item1(data);
|
||||
str += '</tr>';
|
||||
str += '<tr class="collapse tableRowHoverOff" style="cursor: pointer;" id="collapse_' + data.idx + '">';
|
||||
str += make_item2(data);
|
||||
str += '</tr>';
|
||||
return str;
|
||||
}
|
||||
|
||||
function make_item1(data) {
|
||||
//console.log(data);
|
||||
str = '';
|
||||
str += '<td scope="col" style="width:5%; text-align:center;">'+ data.idx + '</td>';
|
||||
str += '<td scope="col" style="width:8%; text-align:center;">'+ data.callback_id + '</td>';
|
||||
str += '<td scope="col" style="width:10%; text-align:center;">'+ data.start_time + '</td>';
|
||||
str += '<td scope="col" style="width:20%; text-align:center;">'+ data.filename + '</td>';
|
||||
str += '<td id="status_'+data.idx+'" scope="col" style="width:8%; text-align:center;">'+ data.status_kor + '</td>';
|
||||
var visi = 'hidden';
|
||||
if (parseInt(data.percent) > 0) {
|
||||
visi = 'visible';
|
||||
}
|
||||
str += '<td scope="col" style="width:20%; text-align:center;"><div class="progress"><div id="progress_'+data.idx+'" class="progress-bar" style="visibility: '+visi+'; width:'+data.percent+'%">'+data.percent +'%</div></div></td>';
|
||||
str += '<td scope="col" style="width:5%; text-align:center;">'+ data.duration_str + '</td>';
|
||||
str += '<td id="current_pf_count_'+data.idx+'" scope="col" style="width:5%; text-align:center;">'+ data.current_pf_count + '</td>';
|
||||
str += '<td id="current_speed_'+data.idx+'" scope="col" style="width:8%; text-align:center;">'+ data.current_speed + '</td>';
|
||||
str += '<td id="download_time_'+data.idx+'" scope="col" style="width:8%; text-align:center;">'+ data.download_time + '</td>';
|
||||
str += '<td id="button_'+data.idx+'" scope="col" style="width:8%; text-align:center;">';
|
||||
if (data.status_str == 'DOWNLOADING') {
|
||||
str += j_button('stop_btn', '중지', {'idx':data.idx}, 'danger', false, false);
|
||||
}
|
||||
str += '</td>'
|
||||
return str;
|
||||
}
|
||||
|
||||
function make_item2(data) {
|
||||
str = '';
|
||||
str += '<td colspan="11">';
|
||||
str += '<div id="detail_'+data.idx+'">';
|
||||
str += get_detail(data);
|
||||
str += '</div>';
|
||||
str += '</td>';
|
||||
return str
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function get_detail(data) {
|
||||
var str = j_row_info('URL', data.url);
|
||||
str += j_row_info('임시경로', data.temp_fullpath);
|
||||
str += j_row_info('저장경로', data.save_fullpath);
|
||||
str += j_row_info('진행률(current/total)', data.percent+ '% (' + data.current_duration + ' / ' + data.duration + ')');
|
||||
str += j_row_info('현재 비트레이트', data.current_bitrate);
|
||||
str += j_row_info('종료시간', data.end_time);
|
||||
str += j_row_info('허용 Packet Fail 수', data.max_pf_count);
|
||||
str += j_row_info('파일 Exist', data.exist);
|
||||
if (data.status_str == 'COMPLETED') {
|
||||
str += j_row_info('파일 크기', data.filesize_str);
|
||||
str += j_row_info('다운 속도', data.download_speed);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function on_start() {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/entity_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
make_download_list(data)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function button_html(data) {
|
||||
//console.log(data)
|
||||
str = '';
|
||||
if (data.status_str == 'DOWNLOADING') {
|
||||
str = j_button('stop_btn', '중지', {'idx':data.idx}, 'danger', false, false);
|
||||
}
|
||||
$("#button_" + data.idx).html(str);
|
||||
}
|
||||
|
||||
function status_html(data) {
|
||||
var progress = document.getElementById("progress_" + data.idx);
|
||||
progress.style.width = data.percent+ '%';
|
||||
progress.innerHTML = data.percent+ '%';
|
||||
progress.style.visibility = 'visible';
|
||||
document.getElementById("status_" + data.idx).innerHTML = data.status_kor;
|
||||
document.getElementById("current_pf_count_" + data.idx).innerHTML = data.current_pf_count;
|
||||
document.getElementById("current_speed_" + data.idx).innerHTML = data.current_speed;
|
||||
document.getElementById("download_time_" + data.idx).innerHTML = data.download_time;
|
||||
document.getElementById("detail_" + data.idx).innerHTML = get_detail(data);
|
||||
}
|
||||
function on_status(data) {
|
||||
//console.log(data)
|
||||
tmp = document.getElementById("progress_" + data.entity_id)
|
||||
if (tmp != null) {
|
||||
document.getElementById("progress_" + data.entity_id).style.width = data.ffmpeg_percent + '%';
|
||||
document.getElementById("progress_" + data.entity_id + "_label").innerHTML = data.ffmpeg_status_kor + "(" + data.ffmpeg_percent + "%)" + ' ' + ((data.ffmpeg_arg != null) ? data.ffmpeg_arg.data.current_speed : '')
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
function make_download_list(data) {
|
||||
str = '';
|
||||
for (i in data) {
|
||||
str += m_row_start();
|
||||
str += m_col(1, data[i].entity_id);
|
||||
str += m_col(2, data[i].created_time);
|
||||
str += m_col(4, (data[i].filename != null) ? data[i].filename : '');
|
||||
|
||||
label = data[i].ffmpeg_status_kor
|
||||
if (data[i].ffmpeg_percent != 0) {
|
||||
label += '(' + data[i].ffmpeg_percent + '%)'
|
||||
}
|
||||
tmp = m_progress('progress_' + data[i].entity_id, data[i].ffmpeg_percent, label)
|
||||
str += m_col(3, tmp);
|
||||
tmp = m_button('program_cancel_btn', '취소', [{'key': 'id', 'value': data[i].entity_id}]);
|
||||
tmp = m_button_group(tmp)
|
||||
str += m_col(2, tmp)
|
||||
str += m_row_end();
|
||||
if (i != data.length - 1) str += m_hr(0);
|
||||
}
|
||||
document.getElementById("download_list_div").innerHTML = str;
|
||||
}
|
||||
|
||||
$("body").on('click', '#program_cancel_btn', function (e) {
|
||||
e.preventDefault();
|
||||
entity_id = $(this).data('id')
|
||||
send_data = {'command': 'cancel', 'entity_id': entity_id}
|
||||
queue_command(send_data)
|
||||
});
|
||||
|
||||
$("body").on('click', '#reset_btn', function (e) {
|
||||
e.preventDefault();
|
||||
entity_id = $(this).data('id')
|
||||
send_data = {'command': 'reset', 'entity_id': -1}
|
||||
queue_command(send_data)
|
||||
});
|
||||
|
||||
$("body").on('click', '#delete_completed_btn', function (e) {
|
||||
e.preventDefault();
|
||||
entity_id = $(this).data('id')
|
||||
send_data = {'command': 'delete_completed', 'entity_id': -1}
|
||||
queue_command(send_data)
|
||||
});
|
||||
|
||||
function queue_command(data) {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/queue_command',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret == 'notify') {
|
||||
$.notify('<strong>' + ret.log + '</strong>', {type: 'warning'});
|
||||
}
|
||||
on_start();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("body").on('click', '#go_ffmpeg_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$(location).attr('href', '/ffmpeg')
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@
|
||||
{{ macros.setting_global_scheduler_sub_button(arg['scheduler'], arg['is_running']) }}
|
||||
{{ macros.setting_input_text('ohli24_interval', '스케쥴링 실행 정보', value=arg['ohli24_interval'], col='3', desc=['Inverval(minute 단위)이나 Cron 설정']) }}
|
||||
{{ macros.setting_checkbox('ohli24_auto_start', '시작시 자동실행', value=arg['ohli24_auto_start'], desc='On : 시작시 자동으로 스케쥴러에 등록됩니다.') }}
|
||||
{{ macros.setting_input_textarea('ohli24_auto_code_list', '자동 다운로드할 작품 코드', desc=['all 입력시 모두 받기', '구분자 | 또는 엔터'], value=arg['ohli24_auto_code_list'], row='10') }}
|
||||
{{ macros.setting_input_textarea('ohli24_auto_code_list', '자동 다운로드할 작품 코드', desc=['구분자 | 또는 엔터'], value=arg['ohli24_auto_code_list'], row='10') }}
|
||||
{{ macros.setting_checkbox('ohli24_auto_mode_all', '에피소드 모두 받기', value=arg['ohli24_auto_mode_all'], desc=['On : 이전 에피소드를 모두 받습니다.', 'Off : 최신 에피소드만 받습니다.']) }}
|
||||
{{ macros.m_tab_content_end() }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user