112 lines
5.3 KiB
HTML
112 lines
5.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div>
|
|
{{ macros.m_button_group([['globalSettingSaveBtn', '설정 저장']])}}
|
|
{{ macros.m_row_start('5') }}
|
|
{{ macros.m_row_end() }}
|
|
<nav>
|
|
{{ macros.m_tab_head_start() }}
|
|
{{ macros.m_tab_head('normal', '일반', true) }}
|
|
{{ macros.m_tab_head('auto', '홈화면 자동', false) }}
|
|
{{ macros.m_tab_head('action', '기타', false) }}
|
|
{{ macros.m_tab_head_end() }}
|
|
</nav>
|
|
<form id="setting">
|
|
<div class="tab-content" id="nav-tabContent">
|
|
{{ macros.m_tab_content_start('normal', true) }}
|
|
{{ macros.setting_input_text_and_buttons('ohli24_url', 'ohli24 URL', [['go_btn', 'GO']], value=arg['ohli24_url']) }}
|
|
{{ macros.setting_input_text('ohli24_download_path', '저장 폴더', value=arg['ohli24_download_path'], desc='정상적으로 다운 완료 된 파일이 이동할 폴더 입니다. ') }}
|
|
{{ macros.setting_input_int('ohli24_max_ffmpeg_process_count', '동시 다운로드 수', value=arg['ohli24_max_ffmpeg_process_count'], desc='동시에 다운로드 할 에피소드 갯수입니다.') }}
|
|
{{ macros.setting_select('ohli24_download_method', '다운로드 방법', [['ffmpeg', 'ffmpeg (기본)'], ['ytdlp', 'yt-dlp']], value=arg.get('ohli24_download_method', 'ffmpeg'), desc='m3u8 다운로드에 사용할 도구를 선택합니다.') }}
|
|
{{ macros.setting_checkbox('ohli24_order_desc', '요청 화면 최신순 정렬', value=arg['ohli24_order_desc'], desc='On : 최신화부터, Off : 1화부터') }}
|
|
{{ macros.setting_checkbox('ohli24_auto_make_folder', '제목 폴더 생성', value=arg['ohli24_auto_make_folder'], desc='제목으로 폴더를 생성하고 폴더 안에 다운로드합니다.') }}
|
|
<div id="ohli24_auto_make_folder_div" class="collapse">
|
|
{{ macros.setting_input_text('ohli24_finished_insert', '완결 표시', col='3', value=arg['ohli24_finished_insert'], desc=['완결된 컨텐츠 폴더명 앞에 넣을 문구입니다.']) }}
|
|
{{ macros.setting_checkbox('ohli24_auto_make_season_folder', '시즌 폴더 생성', value=arg['ohli24_auto_make_season_folder'], desc=['On : Season 번호 폴더를 만듭니다.']) }}
|
|
</div>
|
|
{{ macros.setting_checkbox('ohli24_uncompleted_auto_enqueue', '자동으로 다시 받기', value=arg['ohli24_uncompleted_auto_enqueue'], desc=['On : 플러그인 로딩시 미완료인 항목은 자동으로 다시 받습니다.']) }}
|
|
{{ macros.m_tab_content_end() }}
|
|
|
|
{{ macros.m_tab_content_start('auto', false) }}
|
|
{{ macros.global_setting_scheduler_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=['구분자 | 또는 엔터'], 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() }}
|
|
|
|
{{ macros.m_tab_content_start('action', false) }}
|
|
{{ macros.setting_buttons([['global_one_execute_btn', '1회 실행']], left='1회 실행' ) }}
|
|
{{ macros.setting_buttons([['global_reset_db_btn', 'DB 초기화']], left='DB정리' ) }}
|
|
{{ macros.m_tab_content_end() }}
|
|
|
|
</div><!--tab-content-->
|
|
</form>
|
|
</div> <!--전체-->
|
|
|
|
<script type="text/javascript">
|
|
var package_name = "{{arg['package_name'] }}";
|
|
var sub = "{{arg['sub'] }}";
|
|
var current_data = null;
|
|
|
|
|
|
$(document).ready(function(){
|
|
use_collapse('ohli24_auto_make_folder');
|
|
});
|
|
|
|
$('#ani365_auto_make_folder').change(function() {
|
|
use_collapse('ohli24_auto_make_folder');
|
|
});
|
|
|
|
|
|
$("body").on('click', '#go_btn', function(e){
|
|
e.preventDefault();
|
|
let url = document.getElementById("ohli24_url").value
|
|
window.open(url, "_blank");
|
|
});
|
|
|
|
// 1회 실행 버튼
|
|
$("body").on('click', '#global_one_execute_btn', function(e){
|
|
e.preventDefault();
|
|
$.ajax({
|
|
url: '/'+package_name+'/ajax/'+sub+'/immediately_execute',
|
|
type: "POST",
|
|
cache: false,
|
|
dataType: "json",
|
|
success: function(ret) {
|
|
if (ret.ret == 'success') {
|
|
notify('스케줄러 1회 실행을 시작합니다.', 'success');
|
|
} else {
|
|
notify(ret.msg || '실행 실패', 'danger');
|
|
}
|
|
},
|
|
error: function(xhr, status, error) {
|
|
notify('에러: ' + error, 'danger');
|
|
}
|
|
});
|
|
});
|
|
|
|
// DB 초기화 버튼
|
|
$("body").on('click', '#global_reset_db_btn', function(e){
|
|
e.preventDefault();
|
|
if (!confirm('정말 DB를 초기화하시겠습니까?')) return;
|
|
$.ajax({
|
|
url: '/'+package_name+'/ajax/'+sub+'/reset_db',
|
|
type: "POST",
|
|
cache: false,
|
|
dataType: "json",
|
|
success: function(ret) {
|
|
if (ret.ret == 'success') {
|
|
notify('DB가 초기화되었습니다.', 'success');
|
|
} else {
|
|
notify(ret.msg || '초기화 실패', 'danger');
|
|
}
|
|
},
|
|
error: function(xhr, status, error) {
|
|
notify('에러: ' + error, 'danger');
|
|
}
|
|
});
|
|
});
|
|
|
|
</script>
|
|
{% endblock %} |