first commit
This commit is contained in:
74
templates/inflearn_category.html
Executable file
74
templates/inflearn_category.html
Executable file
@@ -0,0 +1,74 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<div>
|
||||
<div class="input-group mb-2">
|
||||
<input
|
||||
id="input_search"
|
||||
type="search"
|
||||
class="form-control rounded"
|
||||
placeholder="Search"
|
||||
aria-label="Search"
|
||||
aria-describedby="search-addon"
|
||||
/>
|
||||
<button id="btn_search" type="button" class="btn btn-outline-primary">
|
||||
search
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
id="anime_category"
|
||||
class="btn-group"
|
||||
role="group"
|
||||
aria-label="Basic example"
|
||||
>
|
||||
<button id="ing" type="button" class="btn btn-success">방영중</button>
|
||||
<button id="movie" type="button" class="btn btn-primary">극장판</button>
|
||||
<button id="complete_anilist" type="button" class="btn btn-dark">
|
||||
완결
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form id="airing_list_form">
|
||||
<div id="airing_list"></div>
|
||||
</form>
|
||||
<form id="screen_movie_list_form">
|
||||
<div id="screen_movie_list" class="container"></div>
|
||||
</form>
|
||||
<!-- <div class="text-center">-->
|
||||
<!-- <div id="spinner" class="spinner-border" role="status">-->
|
||||
<!-- <span class="sr-only">Loading...</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<form id="program_auto_form">
|
||||
<div id="episode_list"></div>
|
||||
</form>
|
||||
<div class="spinner" id="spinner" style="display: none">
|
||||
<div class="double-bounce1"></div>
|
||||
<div class="double-bounce2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--전체-->
|
||||
<link
|
||||
href="{{ url_for('.static', filename='css/%s.css' % arg['template_name']) }}"
|
||||
type="text/css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<script>
|
||||
"use strict";
|
||||
const package_name = '{{ arg["package_name"] }}';
|
||||
const inflearn_url = "{{arg['inflearn_url']}}";
|
||||
</script>
|
||||
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js"
|
||||
integrity="sha512-jNDtFf7qgU0eH/+Z42FG4fw3w7DM/9zbgNPe3wfJlCylVDTT3IgKW5r92Vy9IHa6U50vyMz5gRByIu4YIXFtaQ=="
|
||||
crossorigin="anonymous"
|
||||
referrerpolicy="no-referrer"
|
||||
></script>
|
||||
|
||||
<script src="{{ url_for('.static', filename='js/%s.js' % arg['template_name']) }}"></script>
|
||||
<script
|
||||
async
|
||||
src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.7.0/dist/lazyload.min.js"
|
||||
></script>
|
||||
{% endblock %}
|
||||
64
templates/inflearn_list.html
Normal file
64
templates/inflearn_list.html
Normal file
@@ -0,0 +1,64 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<div>
|
||||
<form id="form_search" class="form-inline" style="text-align: left">
|
||||
<div class="container-fluid">
|
||||
<div class="row show-grid">
|
||||
<span class="col-md-4">
|
||||
<select id="order" name="order" class="form-control form-control-sm">
|
||||
<option value="desc">최근순</option>
|
||||
<option value="asc">오래된순</option>
|
||||
</select>
|
||||
<select
|
||||
id="option"
|
||||
name="option"
|
||||
class="form-control form-control-sm"
|
||||
>
|
||||
<option value="all">전체</option>
|
||||
<option value="completed">완료</option>
|
||||
</select>
|
||||
</span>
|
||||
<span class="col-md-8">
|
||||
<input
|
||||
id="search_word"
|
||||
name="search_word"
|
||||
class="form-control form-control-sm w-75"
|
||||
type="text"
|
||||
placeholder=""
|
||||
aria-label="Search"
|
||||
/>
|
||||
<button id="search" class="btn btn-sm btn-outline-success">
|
||||
검색
|
||||
</button>
|
||||
<button id="reset_btn" class="btn btn-sm btn-outline-success">
|
||||
리셋
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="page1"></div>
|
||||
{{ macros.m_hr_head_top() }} {{ macros.m_row_start('0') }} {{ macros.m_col(2,
|
||||
macros.m_strong('Poster')) }} {{ macros.m_col(10, macros.m_strong('Info')) }}
|
||||
{{ macros.m_row_end() }} {{ macros.m_hr_head_bottom() }}
|
||||
<div id="list_div"></div>
|
||||
<div id="page2"></div>
|
||||
</div>
|
||||
<link
|
||||
href="{{ url_for('.static', filename='css/%s.css' % arg['template_name'])
|
||||
}}"
|
||||
type="text/css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<script type="text/javascript">
|
||||
const package_name = "{{arg['package_name']}}";
|
||||
</script>
|
||||
<script src="{{ url_for('.static', filename='js/%s.js' % arg['template_name']) }}"></script>
|
||||
<style>
|
||||
@media (min-width: 576px) {
|
||||
.container {
|
||||
max-width: 98%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
138
templates/inflearn_queue.html
Executable file
138
templates/inflearn_queue.html
Executable file
@@ -0,0 +1,138 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div width="100%">
|
||||
{{ 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 (Title)')) }}
|
||||
<!-- {{ macros.m_col(3, macros.m_strong('ProgramTitle')) }}-->
|
||||
{{ macros.m_col(3, macros.m_strong('Status')) }}
|
||||
{{ macros.m_col(1, macros.m_strong('Action')) }}
|
||||
{{ macros.m_row_end() }}
|
||||
{{ macros.m_hr_head_bottom() }}
|
||||
<div id="download_list_div"></div>
|
||||
</div> <!--전체-->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
const package_name = 'linkkf-yommi';
|
||||
let current_data = null;
|
||||
|
||||
$(document).ready(function(){
|
||||
const protocol = window.location.protocol;
|
||||
const socket = io.connect(protocol + "//" + document.domain + ":" + location.port + "/" + package_name);
|
||||
|
||||
socket.on('on_connect', function(data){
|
||||
if (data != null) {
|
||||
on_start(data);
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('status', function(data){
|
||||
on_status(data)
|
||||
});
|
||||
|
||||
socket.on('list_refresh', function(data){
|
||||
on_start(data)
|
||||
});
|
||||
});
|
||||
|
||||
function on_start(data) {
|
||||
make_download_list(data)
|
||||
}
|
||||
|
||||
function on_status(data) {
|
||||
// console.log(data)
|
||||
let tmp = document.getElementById("progress_"+data.plugin_id)
|
||||
if (tmp != null) {
|
||||
document.getElementById("progress_"+data.plugin_id).style.width = data.data.percent+ '%';
|
||||
document.getElementById("progress_"+data.plugin_id+"_label").innerHTML = data.status + "(" + data.data.percent + "%)" + ' x' + ((data.data != null)?data.data.current_speed:'');
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
tmp_filename = '<b>' + data[i].info.program_title + '</b><br />' + data[i].info.filename
|
||||
str += m_col(4, tmp_filename);
|
||||
// str += m_col(3, data[i].info.program_title);
|
||||
|
||||
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(1, 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}
|
||||
program_auto_command(send_data)
|
||||
});
|
||||
|
||||
$("body").on('click', '#reset_btn', function(e){
|
||||
e.preventDefault();
|
||||
entity_id = $(this).data('id')
|
||||
send_data = {'command':'reset', 'entity_id':-1}
|
||||
program_auto_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}
|
||||
program_auto_command(send_data)
|
||||
});
|
||||
|
||||
|
||||
function program_auto_command(data) {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/program_auto_command',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret == 'notify') {
|
||||
$.notify('<strong>'+ ret.log +'</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("body").on('click', '#go_ffmpeg_btn', function(e){
|
||||
e.preventDefault();
|
||||
$(location).attr('href', '/ffmpeg')
|
||||
});
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@media (min-width: 576px) {
|
||||
.container {
|
||||
max-width: 98%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
63
templates/inflearn_request.html
Executable file
63
templates/inflearn_request.html
Executable file
@@ -0,0 +1,63 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<div>
|
||||
<form id="program_list">
|
||||
{{ macros.setting_input_text_and_buttons('code', '작품 Code',
|
||||
[['analysis_btn', '분석'], ['go_inflearn_btn', 'Go Linkkf'],
|
||||
['go_modal_airing', '방영중']], desc='URL: https://linkkf.app/[코드]/
|
||||
형식에서 코드부분 숫자 (예> 22005 원피스)') }}
|
||||
<!-- {#-->
|
||||
<!-- <botton-->
|
||||
<!-- id="go_modal_airing"-->
|
||||
<!-- type="button"-->
|
||||
<!-- class="btn btn-primary"-->
|
||||
<!-- data-toggle="modal"-->
|
||||
<!-- data-target="#exModal"-->
|
||||
<!-- >방영중</botton-->
|
||||
<!-- >#}-->
|
||||
</form>
|
||||
<form id="airing_list_form">
|
||||
<div id="airing_list"></div>
|
||||
</form>
|
||||
<form id="program_auto_form">
|
||||
<div id="episode_list"></div>
|
||||
</form>
|
||||
</div>
|
||||
<!--전체-->
|
||||
<link
|
||||
href="{{ url_for('.static', filename='css/%s.css' % arg['template_name'])
|
||||
}}"
|
||||
type="text/css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<script type="text/javascript">
|
||||
const package_name = "linkkf-yommi";
|
||||
const inflearn_url = "{{arg['inflearn_url']}}";
|
||||
|
||||
$(document).ready(function () {
|
||||
// console.log ('current_code::', {{arg['current_code']}})
|
||||
// {#console.log(params)#}
|
||||
// {#code = params.code#}
|
||||
// {#console.log('code:::> ', code)#}
|
||||
|
||||
if ("{{arg['current_code']}}" !== "") {
|
||||
code = "{{arg['current_code']}}";
|
||||
document.getElementById("code").value = "{{arg['current_code']}}";
|
||||
document.getElementById("analysis_btn").click();
|
||||
|
||||
// {#$('[data-tooltip="true"]').tooltip();#}
|
||||
// {#$('.bootstrap-tooltip').tooltip();#}
|
||||
}
|
||||
|
||||
// console.log('params.code:::> ', params.code)
|
||||
|
||||
if (params.code === "") {
|
||||
} else {
|
||||
document.getElementById("code").value = params.code;
|
||||
document.getElementById("analysis_btn").click();
|
||||
}
|
||||
// console.log('code:::' ,code)
|
||||
});
|
||||
</script>
|
||||
<script src="{{ url_for('.static', filename='js/%s.js' % arg['template_name']) }}"></script>
|
||||
{% endblock %}
|
||||
81
templates/inflearn_setting.html
Executable file
81
templates/inflearn_setting.html
Executable file
@@ -0,0 +1,81 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
{{ macros.m_button_group([['global_setting_save_btn', '설정 저장']])}}
|
||||
{{ macros.m_row_start('5') }}
|
||||
{{ macros.m_row_end() }}
|
||||
<nav>
|
||||
{{ macros.m_tab_head_start() }}
|
||||
{{ macros.m_tab_head2('normal', '일반', true) }}
|
||||
{{ macros.m_tab_head2('auto', '홈화면 자동', false) }}
|
||||
{{ macros.m_tab_head2('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('inflearn_url', 'Linkkf URL', [['go_btn', 'GO']], value=arg['inflearn_url'], desc=None) }}
|
||||
{{ macros.setting_input_text('download_path', '저장 폴더', value=arg['download_path'], desc='정상적으로 완료된 파일이 이동할 폴더 입니다. ') }}
|
||||
{{ macros.setting_checkbox('auto_make_folder', '제목 폴더 생성', value=arg['auto_make_folder'], desc='제목으로 폴더를 생성하고 폴더 안에 다운로드합니다.') }}
|
||||
{{ macros.setting_input_int('max_ffmpeg_process_count', '동시 다운로드 수', value=arg['max_ffmpeg_process_count'], desc='동시에 다운로드 할 에피소드 갯수입니다.') }}
|
||||
{# {{ macros.setting_global_scheduler_sub_button(arg['scheduler'], arg['is_running']) }}#}
|
||||
{{ macros.setting_global_scheduler_button(arg['scheduler'], arg['is_running']) }}
|
||||
{# {{ macros.setting_input_int('auto_interval', '스케쥴링 실행 주기', value=arg['auto_interval'], min='1', placeholder='10', desc='minute 단위') }}#}
|
||||
{{ macros.setting_input_text('auto_interval', '스케쥴링 실행 주기', value=arg['auto_interval'], col='3', placeholder='10', desc=['Inverval(minute 단위)이나 Cron 설정']) }}
|
||||
{{ macros.setting_checkbox('auto_start', '시작시 자동실행', value=arg['auto_start'], desc='On : 시작시 자동으로 스케쥴러에 등록됩니다.') }}
|
||||
{{ macros.setting_input_textarea('whitelist_program', '자동 다운로드 codes', value=arg['whitelist_program'], desc=['이 곳에 있는 code들을 스케쥴러 일정마다 자동으로 다운로드합니다.', ', 또는 Enter로 구분']) }}
|
||||
<!-- <div id="inflearn_auto_make_folder_div" class="collapse"> -->
|
||||
{{ macros.setting_input_text('inflearn_finished_insert', '완결 표시', col='3', value=arg['inflearn_finished_insert'], desc=['완결된 컨텐츠 폴더명 앞에 넣을 문구입니다.']) }}
|
||||
{{ macros.setting_checkbox('inflearn_auto_make_season_folder', '시즌 폴더 생성', value=arg['inflearn_auto_make_season_folder'], desc=['On : Season 번호 폴더를 만듭니다.']) }}
|
||||
<!-- </div> -->
|
||||
{{ macros.m_tab_content_end() }}
|
||||
{{ macros.m_tab_content_start('auto', false) }}
|
||||
{# {{ macros.setting_global_scheduler_sub_button(arg['scheduler'], arg['is_running']) }}#}
|
||||
{# {{ macros.setting_input_text('ani365_interval', '스케쥴링 실행 정보', value=arg['ani365_interval'], col='3', desc=['Inverval(minute 단위)이나 Cron 설정']) }}#}
|
||||
{# {{ macros.setting_checkbox('ani365_auto_start', '시작시 자동실행', value=arg['ani365_auto_start'], desc='On : 시작시 자동으로 스케쥴러에 등록됩니다.') }}#}
|
||||
{# {{ macros.setting_input_textarea('ani365_auto_code_list', '자동 다운로드할 작품 코드', desc=['all 입력시 모두 받기', '구분자 | 또는 엔터'], value=arg['ani365_auto_code_list'], row='10') }}#}
|
||||
{# {{ macros.setting_checkbox('ani365_auto_mode_all', '에피소드 모두 받기', value=arg['ani365_auto_mode_all'], desc=['On : 이전 에피소드를 모두 받습니다.', 'Off : 최신 에피소드만 받습니다.']) }}#}
|
||||
{{ macros.m_tab_content_end() }}
|
||||
{{ macros.m_tab_content_start('action', false) }}
|
||||
{{ macros.setting_button([['global_one_execute_sub_btn', '1회 실행']], left='1회 실행' ) }}
|
||||
{{ macros.setting_button([['global_reset_db_sub_btn', 'DB 초기화']], left='DB정리' ) }}
|
||||
{{ macros.m_tab_content_end() }}
|
||||
<!-- {{ macros.setting_button([['global_setting_save_btn', '설정 저장']]) }} -->
|
||||
</div>
|
||||
</form>
|
||||
</div> <!--전체-->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{# {{ arg }}#}
|
||||
const package_name = "{{ arg['package_name'] }}";
|
||||
const sub = "{{ arg['sub'] }}";
|
||||
const current_data = null;
|
||||
|
||||
$(document).ready(function(){
|
||||
use_collapse('include_date');
|
||||
use_collapse('inflearn_auto_make_folder');
|
||||
|
||||
});
|
||||
|
||||
$('#include_date').change(function() {
|
||||
use_collapse('include_date');
|
||||
});
|
||||
|
||||
$('#inflearn_auto_make_folder').change(function() {
|
||||
use_collapse('inflearn_auto_make_folder');
|
||||
});
|
||||
|
||||
$("body").on('click', '#go_btn', function(e){
|
||||
e.preventDefault();
|
||||
url = document.getElementById("inflearn_url").value
|
||||
window.open(url, "_blank");
|
||||
});
|
||||
|
||||
$('#auto_interval').change( function () {
|
||||
console.log('change interval');
|
||||
})
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user