v0.7.2: Linkkf subtitle download, list-request integration, and hot reload stability improvements
This commit is contained in:
@@ -768,6 +768,12 @@ $(document).ready(function(){
|
||||
str += '<button class="action-btn btn-play" data-path="' + item.filepath + '" data-filename="' + item.filename + '"><i class="fa fa-play"></i> 재생</button>';
|
||||
str += '<button class="action-btn btn-merge-sub" data-id="' + item.id + '" data-filename="' + item.filename + '"><i class="fa fa-cc"></i> 자막합침</button>';
|
||||
}
|
||||
|
||||
// [작품소개] 버튼 추가 - JSON 버튼 왼쪽에 배치
|
||||
if (item.content_code) {
|
||||
str += '<button class="action-btn" onclick="location.href=\'/' + package_name + '/' + sub + '/request?code=' + item.content_code + '\'"><i class="fa fa-info-circle"></i> 작품소개</button>';
|
||||
}
|
||||
|
||||
str += '<button class="action-btn" onclick="m_modal(current_data.list[' + i + '])"><i class="fa fa-code"></i> JSON</button>';
|
||||
str += '<button class="action-btn" onclick="search_item(\'' + (item.title || '') + '\')"><i class="fa fa-search"></i> 검색</button>';
|
||||
str += '<button class="action-btn" onclick="db_remove(' + item.id + ')"><i class="fa fa-trash"></i> 삭제</button>';
|
||||
|
||||
@@ -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