v0.7.2: Linkkf subtitle download, list-request integration, and hot reload stability improvements
This commit is contained in:
@@ -195,45 +195,21 @@
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// console.log(params.wr_id)
|
||||
// console.log(findGetParameter('wr_id'))
|
||||
// console.log(params.code)
|
||||
if (params.code === '') {
|
||||
|
||||
} else {
|
||||
document.getElementById("code").value = params.code
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
// URL 파라미터 처리 (code)
|
||||
const urlCode = params.code || findGetParameter('code');
|
||||
const currentCode = "{{arg['linkkf_current_code']}}";
|
||||
|
||||
const targetCode = urlCode || currentCode;
|
||||
|
||||
if (targetCode) {
|
||||
document.getElementById("code").value = targetCode;
|
||||
// wr_id, bo_table 등이 있으면 같이 전달
|
||||
analyze(params.wr_id || findGetParameter('wr_id'), params.bo_table || findGetParameter('bo_table'));
|
||||
}
|
||||
|
||||
if ("{{arg['linkkf_current_code']}}" !== "") {
|
||||
if (params.code === null) {
|
||||
// console.log('params.code === null')
|
||||
document.getElementById("code").value = "{{arg['linkkf_current_code']}}";
|
||||
|
||||
} else if (params.code === '') {
|
||||
document.getElementById("code").value = "{{arg['linkkf_current_code']}}";
|
||||
} else {
|
||||
|
||||
// console.log('params code exist')
|
||||
// console.log(params.code)
|
||||
document.getElementById("code").value = params.code
|
||||
|
||||
analyze(params.wr_id, params.bo_table)
|
||||
// document.getElementById("analysis_btn").click();
|
||||
// $('#analysis_btn').trigger('click')
|
||||
}
|
||||
// 값이 공백이 아니면 분석 버튼 계속 누름
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// console.log('wr_id::', params.wr_id)
|
||||
|
||||
});
|
||||
|
||||
// Enter 키로 검색 트리거
|
||||
@@ -364,6 +340,37 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#down_subtitle_btn', function (e) {
|
||||
e.preventDefault();
|
||||
all = $('input[id^="checkbox_"]');
|
||||
let data = [];
|
||||
let idx;
|
||||
for (let i in all) {
|
||||
if (all[i].checked) {
|
||||
idx = parseInt(all[i].id.split('_')[1])
|
||||
data.push(current_data.episode[idx]);
|
||||
}
|
||||
}
|
||||
if (data.length == 0) {
|
||||
$.notify('<strong>선택하세요.</strong>', {type: 'warning'});
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_sub_queue_checked_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data: JSON.stringify(data)},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.ret == "success") {
|
||||
$.notify('<strong>백그라운드로 자막 다운로드를 시작합니다.</strong>', {type: 'success'});
|
||||
} else {
|
||||
$.notify('<strong>자막 다운로드 요청 실패: ' + data.log + '</strong>', {type: 'warning'});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
#anime_downloader_wrapper {
|
||||
|
||||
Reference in New Issue
Block a user