Compare commits
34 Commits
62c790b687
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 92771db871 | |||
| 4fef22f3df | |||
| a8138d4a71 | |||
| af3c43128d | |||
| 3b2c92a0e3 | |||
| 2ddda383c5 | |||
| 47a6407dfe | |||
| af73adf1aa | |||
| 3102ba50ad | |||
| 6e9b71f4cc | |||
| 5ff663e288 | |||
| 11a933a4f6 | |||
| a426a57824 | |||
| a900247086 | |||
| 2aa073f504 | |||
| cf5ec2e073 | |||
| f033c96878 | |||
| 64eec69efe | |||
| bf964a6def | |||
| a6541ce299 | |||
| 3872bd7706 | |||
| be00760dc2 | |||
| a0ce90148f | |||
| 8755606986 | |||
| 0462792bfb | |||
| b04d361805 | |||
| 9adb4f73ee | |||
| b13dbeb2d8 | |||
| b08f45bdc8 | |||
| 4e5498d6c8 | |||
| 507a5b9053 | |||
| 1fa8b3f178 | |||
| 02a7d33f35 | |||
| 270ea09336 |
Binary file not shown.
BIN
bin/Linux/chromedriver
Executable file
BIN
bin/Linux/chromedriver
Executable file
Binary file not shown.
709
logic_anilife.py
709
logic_anilife.py
File diff suppressed because it is too large
Load Diff
119
logic_linkkf.py
119
logic_linkkf.py
@@ -33,6 +33,41 @@ from .plugin import P
|
||||
|
||||
|
||||
class LogicLinkkf(LogicModuleBase):
|
||||
db_default = {
|
||||
"linkkf_db_version": "1",
|
||||
"linkkf_url": "https://linkkf.app",
|
||||
"linkkf_download_path": os.path.join(path_data, P.package_name, "linkkf"),
|
||||
"linkkf_auto_make_folder": "True",
|
||||
"linkkf_auto_make_season_folder": "True",
|
||||
"linkkf_finished_insert": "[완결]",
|
||||
"linkkf_max_ffmpeg_process_count": "1",
|
||||
"linkkf_order_desc": "False",
|
||||
"linkkf_auto_start": "False",
|
||||
"linkkf_interval": "* 5 * * *",
|
||||
"linkkf_auto_mode_all": "False",
|
||||
"linkkf_auto_code_list": "all",
|
||||
"linkkf_current_code": "",
|
||||
"linkkf_uncompleted_auto_enqueue": "False",
|
||||
"linkkf_image_url_prefix_series": "",
|
||||
"linkkf_image_url_prefix_episode": "",
|
||||
"linkkf_discord_notify": "True",
|
||||
}
|
||||
current_headers = None
|
||||
current_data = None
|
||||
|
||||
session = requests.Session()
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||
"Chrome/71.0.3578.98 Safari/537.36",
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
|
||||
"Accept-Language": "ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",
|
||||
"Referer": "",
|
||||
}
|
||||
useragent = {
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, "
|
||||
"like Gecko) Chrome/96.0.4664.110 Whale/3.12.129.46 Safari/537.36"
|
||||
}
|
||||
|
||||
def __init__(self, P):
|
||||
super(LogicLinkkf, self).__init__(P, "setting", scheduler_desc="linkkf 자동 다운로드")
|
||||
self.name = "linkkf"
|
||||
@@ -41,9 +76,9 @@ class LogicLinkkf(LogicModuleBase):
|
||||
def process_menu(self, sub, req):
|
||||
arg = P.ModelSetting.to_dict()
|
||||
arg["sub"] = self.name
|
||||
if sub in ["setting", "queue", "list", "request"]:
|
||||
if sub in ["setting", "queue", "category", "list", "request"]:
|
||||
if sub == "request" and req.args.get("content_code") is not None:
|
||||
arg["ani365_current_code"] = req.args.get("content_code")
|
||||
arg["linkkf_current_code"] = req.args.get("content_code")
|
||||
if sub == "setting":
|
||||
job_id = "%s_%s" % (self.P.package_name, self.name)
|
||||
arg["scheduler"] = str(scheduler.is_include(job_id))
|
||||
@@ -56,4 +91,84 @@ class LogicLinkkf(LogicModuleBase):
|
||||
)
|
||||
return render_template("sample.html", title="%s - %s" % (P.package_name, sub))
|
||||
|
||||
def process_ajax(self, sub, req):
|
||||
try:
|
||||
if sub == "analysis":
|
||||
pass
|
||||
elif sub == "anime_list":
|
||||
pass
|
||||
elif sub == "complete_list":
|
||||
pass
|
||||
elif sub == "search":
|
||||
pass
|
||||
elif sub == "add_queue":
|
||||
pass
|
||||
elif sub == "entity_list":
|
||||
pass
|
||||
elif sub == "queue_command":
|
||||
pass
|
||||
elif sub == "add_queue_checked_list":
|
||||
pass
|
||||
elif sub == "web_list":
|
||||
pass
|
||||
elif sub == "db_remove":
|
||||
pass
|
||||
elif sub == "add_whitelist":
|
||||
pass
|
||||
|
||||
except Exception as e:
|
||||
P.logger.error("Exception:%s", e)
|
||||
P.logger.error(traceback.format_exc())
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class ModelLinkkfItem(db.Model):
|
||||
__tablename__ = "{package_name}_linkkf_item".format(package_name=P.package_name)
|
||||
__table_args__ = {"mysql_collate": "utf8_general_ci"}
|
||||
__bind_key__ = P.package_name
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
created_time = db.Column(db.DateTime)
|
||||
completed_time = db.Column(db.DateTime)
|
||||
reserved = db.Column(db.JSON)
|
||||
content_code = db.Column(db.String)
|
||||
season = db.Column(db.Integer)
|
||||
episode_no = db.Column(db.Integer)
|
||||
title = db.Column(db.String)
|
||||
episode_title = db.Column(db.String)
|
||||
linkkf_va = db.Column(db.String)
|
||||
linkkf_vi = db.Column(db.String)
|
||||
linkkf_id = db.Column(db.String)
|
||||
quality = db.Column(db.String)
|
||||
filepath = db.Column(db.String)
|
||||
filename = db.Column(db.String)
|
||||
savepath = db.Column(db.String)
|
||||
video_url = db.Column(db.String)
|
||||
vtt_url = db.Column(db.String)
|
||||
thumbnail = db.Column(db.String)
|
||||
status = db.Column(db.String)
|
||||
linkkf_info = db.Column(db.JSON)
|
||||
|
||||
def __int__(self):
|
||||
self.created_time == datetime.now()
|
||||
|
||||
def __repr__(self):
|
||||
return repr(self.as_dict())
|
||||
|
||||
def as_dict(self):
|
||||
ret = {x.name: getattr(self, x.name) for x in self.__table__.columns}
|
||||
ret["created_time"] = self.created_time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
ret["completed_time"] = (
|
||||
self.completed_time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
if self.completed_time is not None
|
||||
else None
|
||||
)
|
||||
return ret
|
||||
|
||||
def save(self):
|
||||
db.session.add(self)
|
||||
db.session.commit()
|
||||
|
||||
@classmethod
|
||||
def get_by_id(cls, idx):
|
||||
return db.session.query(cls).filter_by(id=idx).first()
|
||||
|
||||
@@ -76,6 +76,7 @@ class LogicOhli24(LogicModuleBase):
|
||||
"ohli24_uncompleted_auto_enqueue": "False",
|
||||
"ohli24_image_url_prefix_series": "https://www.jetcloud.cc/series/",
|
||||
"ohli24_image_url_prefix_episode": "https://www.jetcloud-list.cc/thumbnail/",
|
||||
"ohli24_discord_notify": "True",
|
||||
}
|
||||
current_headers = None
|
||||
current_data = None
|
||||
@@ -323,7 +324,7 @@ class LogicOhli24(LogicModuleBase):
|
||||
|
||||
url = f'{P.ModelSetting.get("ohli24_url")}/bbs/board.php?bo_table=ing&sca={week[today.weekday()]}'
|
||||
|
||||
print(url)
|
||||
# print(url)
|
||||
|
||||
if "all" in content_code_list:
|
||||
ret_data = LogicOhli24.get_auto_anime_info(self, url=url)
|
||||
@@ -467,6 +468,8 @@ class LogicOhli24(LogicModuleBase):
|
||||
"상영시간": "_show_time",
|
||||
"상영일": "_release_date",
|
||||
"개봉년도": "_release_year",
|
||||
"개봉일": "_opening_date",
|
||||
"런타임": "_run_time",
|
||||
}
|
||||
|
||||
list_body_li = tree.xpath('//ul[@class="list-body"]/li')
|
||||
@@ -801,7 +804,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
||||
ourls = parse.urlparse(url)
|
||||
|
||||
headers = {
|
||||
"referer": f"{ourls.scheme}://{ourls.netloc}",
|
||||
"Referer": f"{ourls.scheme}://{ourls.netloc}",
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Whale/3.12.129.46 Safari/537.36",
|
||||
}
|
||||
logger.debug("make_episode_info()::url==> %s", url)
|
||||
|
||||
@@ -50,6 +50,7 @@ class P(object):
|
||||
["setting", "설정"],
|
||||
["request", "요청"],
|
||||
["queue", "큐"],
|
||||
["category", "검색"],
|
||||
["list", "목록"],
|
||||
],
|
||||
"anilife": [
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<div id="preloader">
|
||||
<div class='demo'>
|
||||
<!-- <div class="loader-inner">-->
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-2">
|
||||
<input
|
||||
id="input_search"
|
||||
@@ -9,7 +29,7 @@
|
||||
aria-label="Search"
|
||||
aria-describedby="search-addon"
|
||||
/>
|
||||
<button id="btn_search" type="button" class="btn btn-outline-primary">
|
||||
<button id="btn_search" type="button" class="btn btn-primary">
|
||||
search
|
||||
</button>
|
||||
</div>
|
||||
@@ -70,6 +90,13 @@
|
||||
enableAutoReload: true // it will reload the new image when validating attributes changes
|
||||
});
|
||||
observer.observe();
|
||||
const loader = document.getElementById("preloader");
|
||||
|
||||
const dismissLoadingScreen = async function () {
|
||||
console.log("Before the delay")
|
||||
// await delay(2.5);
|
||||
loader.style.display = "none";
|
||||
};
|
||||
|
||||
|
||||
const get_anime_list = (type, page) => {
|
||||
@@ -128,6 +155,7 @@
|
||||
div_visible = true
|
||||
console.log(div_visible)
|
||||
}
|
||||
dismissLoadingScreen()
|
||||
next_page = page + 1
|
||||
}
|
||||
})
|
||||
@@ -652,5 +680,134 @@
|
||||
button.btn-favorite {
|
||||
background-color: #e0ff42;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: linear-gradient(90deg, #233f48, #6c6fa2, #768dae);
|
||||
}
|
||||
|
||||
.demo {
|
||||
width: 100px;
|
||||
height: 102px;
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: calc(50% - 50px);
|
||||
}
|
||||
|
||||
.circle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.circle:nth-of-type(0) {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.circle:nth-of-type(0) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
172
templates/anime_downloader_anilife_list.html
Normal file
172
templates/anime_downloader_anilife_list.html
Normal file
@@ -0,0 +1,172 @@
|
||||
{% 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>
|
||||
|
||||
<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');
|
||||
});
|
||||
|
||||
$("#search").click(function(e) {
|
||||
e.preventDefault();
|
||||
global_sub_request_search('1');
|
||||
});
|
||||
|
||||
$("body").on('click', '#page', function(e){
|
||||
e.preventDefault();
|
||||
global_sub_request_search($(this).data('page'));
|
||||
});
|
||||
|
||||
$("#reset_btn").click(function(e) {
|
||||
e.preventDefault();
|
||||
document.getElementById("order").value = 'desc';
|
||||
document.getElementById("option").value = 'all';
|
||||
document.getElementById("search_word").value = '';
|
||||
global_sub_request_search('1')
|
||||
});
|
||||
|
||||
|
||||
$("body").on('click', '#json_btn', function(e){
|
||||
e.preventDefault();
|
||||
var id = $(this).data('id');
|
||||
for (i in current_data.list) {
|
||||
if (current_data.list[i].id == id) {
|
||||
m_modal(current_data.list[i])
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("body").on('click', '#self_search_btn', function(e){
|
||||
e.preventDefault();
|
||||
var search_word = $(this).data('title');
|
||||
document.getElementById("search_word").value = search_word;
|
||||
global_sub_request_search('1')
|
||||
});
|
||||
|
||||
$("body").on('click', '#remove_btn', function(e) {
|
||||
e.preventDefault();
|
||||
id = $(this).data('id');
|
||||
$.ajax({
|
||||
url: '/'+package_name+'/ajax/'+sub+ '/db_remove',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {id:id},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
$.notify('<strong>삭제되었습니다.</strong>', {
|
||||
type: 'success'
|
||||
});
|
||||
global_sub_request_search(current_data.paging.current_page, false)
|
||||
} else {
|
||||
$.notify('<strong>삭제 실패</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#request_btn', function(e){
|
||||
e.preventDefault();
|
||||
var content_code = $(this).data('content_code');
|
||||
$(location).attr('href', '/' + package_name + '/' + sub + '/request?content_code=' + content_code)
|
||||
});
|
||||
|
||||
|
||||
|
||||
function make_list(data) {
|
||||
//console.log(data)
|
||||
str = '';
|
||||
for (i in data) {
|
||||
//console.log(data[i])
|
||||
str += m_row_start();
|
||||
str += m_col(1, data[i].id);
|
||||
tmp = (data[i].status == 'completed') ? '완료' : '미완료';
|
||||
str += m_col(1, tmp);
|
||||
tmp = data[i].created_time + '(추가)';
|
||||
if (data[i].completed_time != null)
|
||||
tmp += data[i].completed_time + '(완료)';
|
||||
str += m_col(3, tmp)
|
||||
tmp = data[i].savepath + '<br>' + data[i].filename + '<br><br>';
|
||||
tmp2 = m_button('json_btn', 'JSON', [{'key':'id', 'value':data[i].id}]);
|
||||
tmp2 += m_button('request_btn', '작품 검색', [{'key':'content_code', 'value':data[i].content_code}]);
|
||||
tmp2 += m_button('self_search_btn', '목록 검색', [{'key':'title', 'value':data[i].title}]);
|
||||
tmp2 += m_button('remove_btn', '삭제', [{'key':'id', 'value':data[i].id}]);
|
||||
tmp += m_button_group(tmp2)
|
||||
str += m_col(7, tmp)
|
||||
str += m_row_end();
|
||||
if (i != data.length -1) str += m_hr();
|
||||
}
|
||||
document.getElementById("list_div").innerHTML = str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
width: 100%;
|
||||
/*height: 100vh;*/
|
||||
/*display: flex;*/
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-size: 300% 300%;
|
||||
background-image: linear-gradient(
|
||||
-45deg,
|
||||
rgba(59,173,227,1) 0%,
|
||||
rgba(87,111,230,1) 25%,
|
||||
rgba(152,68,183,1) 51%,
|
||||
rgba(255,53,127,1) 100%
|
||||
);
|
||||
animation: AnimateBG 20s ease infinite;
|
||||
}
|
||||
#main_container {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@keyframes AnimateBG {
|
||||
0%{background-position:0% 50%}
|
||||
50%{background-position:100% 50%}
|
||||
100%{background-position:0% 50%}
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -1,10 +1,31 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
|
||||
<div>
|
||||
<div id="preloader" class="loader">
|
||||
<div class="loader-inner">
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="program_list">
|
||||
{{ macros.setting_input_text_and_buttons('code', '작품 Code',
|
||||
[['analysis_btn', '분석'], ['go_anilife_btn', 'Go 애니라이프']], desc='예)
|
||||
"https://anilife.live/g/l?id=f6e83ec6-bd25-4d6c-9428-c10522687604" 이나 "f6e83ec6-bd25-4d6c-9428-c10522687604"') }}
|
||||
"https://anilife.live/detail/id/101 예> 원피스 코드: 101"')
|
||||
}}
|
||||
</form>
|
||||
<form id="program_auto_form">
|
||||
<div id="episode_list"></div>
|
||||
@@ -23,7 +44,6 @@
|
||||
})
|
||||
|
||||
|
||||
|
||||
function findGetParameter(parameterName) {
|
||||
let result = null,
|
||||
tmp = [];
|
||||
@@ -35,7 +55,48 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
const loader = document.getElementById("preloader");
|
||||
|
||||
const dismissLoadingScreen = async function () {
|
||||
console.log("Before the delay")
|
||||
// await delay(2.5);
|
||||
loader.style.display = "none";
|
||||
};
|
||||
|
||||
const wait_seconds = function () {
|
||||
// REFERENCE: https://www.w3schools.com/jsref/met_win_settimeout.asp
|
||||
let result = setTimeout(dismissLoadingScreen, 2500);
|
||||
console.log(result)
|
||||
};
|
||||
const init = function () {
|
||||
|
||||
}
|
||||
|
||||
function delay(n) {
|
||||
return new Promise(function (resolve) {
|
||||
setTimeout(resolve, n * 1000);
|
||||
});
|
||||
}
|
||||
|
||||
async function myAsyncFunction() {
|
||||
//Do what you want here
|
||||
console.log("Before the delay")
|
||||
|
||||
await delay(2.5);
|
||||
|
||||
console.log("After the delay")
|
||||
//Do what you want here too
|
||||
|
||||
}
|
||||
|
||||
// myAsyncFunction();
|
||||
// window.addEventListener("DOMContentLoaded", dismissLoadingScreen);
|
||||
|
||||
// window.addEventListener("DOMContentLoaded", wait_seconds);
|
||||
|
||||
function analyze(wr_id, bo_table) {
|
||||
// e.preventDefault();
|
||||
// e.stopPropagation()
|
||||
// e.preventDefault();
|
||||
const code = document.getElementById("code").value
|
||||
console.log(code)
|
||||
@@ -50,6 +111,7 @@
|
||||
// {#console.log(ret.code)#}
|
||||
console.log(ret.data)
|
||||
make_program(ret.data)
|
||||
$("#loader").css("display", 'none')
|
||||
} else {
|
||||
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||
}
|
||||
@@ -59,7 +121,7 @@
|
||||
|
||||
function make_program(data) {
|
||||
current_data = data;
|
||||
console.log("current_data::", current_data)
|
||||
// console.log("current_data::", current_data)
|
||||
str = '';
|
||||
tmp = '<div class="form-inline">'
|
||||
tmp += m_button('check_download_btn', '선택 다운로드 추가', []);
|
||||
@@ -100,21 +162,22 @@
|
||||
|
||||
str += m_hr_black();
|
||||
for (i in data.episode) {
|
||||
str += m_row_start(); tmp = '';
|
||||
str += m_row_start();
|
||||
tmp = '';
|
||||
if (data.episode[i].thumbnail)
|
||||
tmp = '<img src="'+ data.episode[i].thumbnail + '" class="img-fluid">'
|
||||
tmp = '<img src="' + data.episode[i].thumbnail + '" class="img-fluid">'
|
||||
str += m_col(3, tmp)
|
||||
tmp = '<strong>' + data.episode[i].ep_num + '화. ' + data.episode[i].title+ '</strong>';
|
||||
tmp = '<strong>' + data.episode[i].ep_num + '화. ' + data.episode[i].title + '</strong>';
|
||||
tmp += '<br>';
|
||||
tmp += data.episode[i].date + '<br>';
|
||||
|
||||
tmp += '<div class="form-inline">'
|
||||
tmp += '<input id="checkbox_'+i+'" name="checkbox_'+i+'" type="checkbox" checked data-toggle="toggle" data-on="선 택" data-off="-" data-onstyle="success" data-offstyle="danger" data-size="small"> '
|
||||
tmp += m_button('add_queue_btn', '다운로드 추가', [{'key':'idx', 'value':i}])
|
||||
tmp += '<input id="checkbox_' + i + '" name="checkbox_' + i + '" type="checkbox" checked data-toggle="toggle" data-on="선 택" data-off="-" data-onstyle="success" data-offstyle="danger" data-size="small"> '
|
||||
tmp += m_button('add_queue_btn', '다운로드 추가', [{'key': 'idx', 'value': i}])
|
||||
tmp += '</div>'
|
||||
str += m_col(9, tmp)
|
||||
str += m_row_end();
|
||||
if (i != data.length -1) str += m_hr(0);
|
||||
if (i != data.length - 1) str += m_hr(0);
|
||||
}
|
||||
document.getElementById("episode_list").innerHTML = str;
|
||||
$('input[id^="checkbox_"]').bootstrapToggle()
|
||||
@@ -128,15 +191,15 @@
|
||||
|
||||
} else {
|
||||
document.getElementById("code").value = params.code
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
document.getElementById("analysis_btn").click();
|
||||
}
|
||||
|
||||
if ( "{{arg['anilife_current_code']}}" !== "") {
|
||||
if ("{{arg['anilife_current_code']}}" !== "") {
|
||||
if (params.code === null) {
|
||||
console.log('params.code === null')
|
||||
document.getElementById("code").value = "{{arg['anilife_current_code']}}";
|
||||
|
||||
} else if(params.code === '') {
|
||||
} else if (params.code === '') {
|
||||
document.getElementById("code").value = "{{arg['anilife_current_code']}}";
|
||||
} else {
|
||||
|
||||
@@ -156,28 +219,33 @@
|
||||
|
||||
})
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function () {
|
||||
$("#loader").css("display", 'none')
|
||||
// console.log('wr_id::', params.wr_id)
|
||||
|
||||
console.log('wr_id::', params.wr_id)
|
||||
|
||||
});
|
||||
|
||||
$("#analysis_btn").unbind("click").bind('click', function(e){
|
||||
$("#analysis_btn").unbind("click").bind('click', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation()
|
||||
$("#loader").css("display", 'block')
|
||||
const code = document.getElementById("code").value
|
||||
console.log(code)
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {code:code},
|
||||
data: {code: code},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
$("#loader").css("display", 'none')
|
||||
if (ret.ret === 'success' && ret.data != null) {
|
||||
// {#console.log(ret.code)#}
|
||||
console.log(ret.data)
|
||||
|
||||
make_program(ret.data)
|
||||
dismissLoadingScreen()
|
||||
} else {
|
||||
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||
}
|
||||
@@ -186,22 +254,22 @@
|
||||
});
|
||||
|
||||
|
||||
$("body").on('click', '#go_anilife_btn', function(e){
|
||||
$("body").on('click', '#go_anilife_btn', function (e) {
|
||||
e.preventDefault();
|
||||
window.open("{{arg['anilife_url']}}", "_blank");
|
||||
});
|
||||
|
||||
$("body").on('click', '#all_check_on_btn', function(e){
|
||||
$("body").on('click', '#all_check_on_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$('input[id^="checkbox_"]').bootstrapToggle('on')
|
||||
});
|
||||
|
||||
$("body").on('click', '#all_check_off_btn', function(e){
|
||||
$("body").on('click', '#all_check_off_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$('input[id^="checkbox_"]').bootstrapToggle('off')
|
||||
});
|
||||
|
||||
$("body").on('click', '#add_queue_btn', function(e){
|
||||
$("body").on('click', '#add_queue_btn', function (e) {
|
||||
e.preventDefault();
|
||||
data = current_data.episode[$(this).data('idx')];
|
||||
console.log('data:::>', data)
|
||||
@@ -209,7 +277,7 @@
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data:JSON.stringify(data)},
|
||||
data: {data: JSON.stringify(data)},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
console.log('#add_queue_btn::data >>', data)
|
||||
@@ -227,7 +295,7 @@
|
||||
|
||||
});
|
||||
|
||||
$("body").on('click', '#check_download_btn', function(e){
|
||||
$("body").on('click', '#check_download_btn', function (e) {
|
||||
e.preventDefault();
|
||||
all = $('input[id^="checkbox_"]');
|
||||
let data = [];
|
||||
@@ -246,7 +314,7 @@
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue_checked_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data:JSON.stringify(data)},
|
||||
data: {data: JSON.stringify(data)},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
$.notify('<strong>백그라운드로 작업을 추가합니다.</strong>', {type: 'success'});
|
||||
@@ -258,6 +326,7 @@
|
||||
button.code-button {
|
||||
min-width: 82px !important;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: block;
|
||||
@@ -306,6 +375,7 @@
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover {
|
||||
position: relative;
|
||||
}
|
||||
@@ -364,5 +434,136 @@
|
||||
#screen_movie_list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
.loader {
|
||||
background: rgb(0, 0, 0, 0.8);
|
||||
background: radial-gradient(#222, #000);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.loader-inner {
|
||||
bottom: 0;
|
||||
height: 60px;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.loader-line-wrap {
|
||||
animation: spin 2000ms cubic-bezier(.175, .885, .32, 1.275) infinite;
|
||||
box-sizing: border-box;
|
||||
height: 50px;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform-origin: 50% 100%;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.loader-line {
|
||||
border: 4px solid transparent;
|
||||
border-radius: 100%;
|
||||
box-sizing: border-box;
|
||||
height: 100px;
|
||||
left: 0;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(1) {
|
||||
animation-delay: -50ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(2) {
|
||||
animation-delay: -100ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(3) {
|
||||
animation-delay: -150ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(4) {
|
||||
animation-delay: -200ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(5) {
|
||||
animation-delay: -250ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(1) .loader-line {
|
||||
border-color: hsl(0, 80%, 60%);
|
||||
height: 90px;
|
||||
width: 90px;
|
||||
top: 7px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(2) .loader-line {
|
||||
border-color: hsl(60, 80%, 60%);
|
||||
height: 76px;
|
||||
width: 76px;
|
||||
top: 14px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(3) .loader-line {
|
||||
border-color: hsl(120, 80%, 60%);
|
||||
height: 62px;
|
||||
width: 62px;
|
||||
top: 21px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(4) .loader-line {
|
||||
border-color: hsl(180, 80%, 60%);
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
top: 28px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(5) .loader-line {
|
||||
border-color: hsl(240, 80%, 60%);
|
||||
height: 34px;
|
||||
width: 34px;
|
||||
top: 35px;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0%, 15% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
734
templates/anime_downloader_linkkf_category.html
Normal file
734
templates/anime_downloader_linkkf_category.html
Normal file
@@ -0,0 +1,734 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<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>
|
||||
<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="theater" 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>
|
||||
<!--전체-->
|
||||
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"
|
||||
></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 type="text/javascript">
|
||||
const package_name = "{{arg['package_name'] }}";
|
||||
const sub = "{{arg['sub'] }}";
|
||||
const linkkf_url = "{{arg['linkkf_url']}}";
|
||||
let current_data = null;
|
||||
let page = 1;
|
||||
let next_page = Number
|
||||
let current_cate = ''
|
||||
let current_query = ''
|
||||
|
||||
const observer = lozad('.lozad', {
|
||||
rootMargin: '10px 0px', // syntax similar to that of CSS Margin
|
||||
threshold: 0.1, // ratio of element convergence
|
||||
enableAutoReload: true // it will reload the new image when validating attributes changes
|
||||
});
|
||||
observer.observe();
|
||||
|
||||
|
||||
const get_anime_list = (type, page) => {
|
||||
console.log(`type: ${type}, page: ${page}`)
|
||||
let url = ''
|
||||
let data = {"page": page, "type": type}
|
||||
|
||||
switch (type) {
|
||||
case 'ing':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'ing'
|
||||
break;
|
||||
case 'movie':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/screen_movie_list'
|
||||
current_cate = 'movie'
|
||||
break;
|
||||
case 'theater':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'theater'
|
||||
break;
|
||||
case 'fin':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/complete_list'
|
||||
current_cate = 'fin'
|
||||
break
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
data: data,
|
||||
cache: false,
|
||||
dataType: "json",
|
||||
success: (ret) => {
|
||||
current_screen_movie_data = ret
|
||||
console.log('ret::>', ret)
|
||||
|
||||
if (current_screen_movie_data !== '') {
|
||||
if (type === "ing") {
|
||||
make_airing_list(ret.data, page)
|
||||
observer.observe();
|
||||
} else if (type === "fin") {
|
||||
make_screen_movie_list(ret.data, page)
|
||||
observer.observe();
|
||||
} else if (type === "theater") {
|
||||
make_screen_movie_list(ret.data, page)
|
||||
observer.observe();
|
||||
} else {
|
||||
make_screen_movie_list(ret.data, page)
|
||||
}
|
||||
div_visible = true
|
||||
console.log(div_visible)
|
||||
}
|
||||
next_page = page + 1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function make_airing_list(data, page) {
|
||||
let str = ''
|
||||
let tmp = ''
|
||||
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
// str += '<div class="card-columns">'
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
for (let i in data.anime_list) {
|
||||
|
||||
tmp = '<div class="col-6 col-sm-4 col-md-3">';
|
||||
tmp += '<div class="card">';
|
||||
// tmp += '<img class="lozad" data-src="' + data.anime_list[i].image_link + '" />';
|
||||
tmp += '<img class="lazyload" src="../static/img_loader_x200.svg" data-original="' + data.anime_list[i].image_link + '" style="cursor: pointer" onclick="location.href=\'./request?code=' + data.anime_list[i].code + '\'"/>';
|
||||
tmp += '<div class="card-body">'
|
||||
// {#tmp += '<button id="code_button" data-code="' + data.episode[i].code + '" type="button" class="btn btn-primary code-button bootstrap-tooltip" data-toggle="button" data-tooltip="true" aria-pressed="true" autocomplete="off" data-placement="top">' +#}
|
||||
// {# '<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 + '<button id="add_whitelist" name="add_whitelist" class="btn btn-sm btn-favorite mb-1" data-code="' +
|
||||
data.anime_list[i].code +
|
||||
'"><i class="bi bi-heart-fill"></i></button></p>';
|
||||
tmp += '<a href="./request?code=' + data.anime_list[i].code + '" class="btn btn-primary cut-text">' + data.anime_list[i].title + '</a>';
|
||||
// tmp +=
|
||||
// '<button id="add_whitelist" name="add_whitelist" class="btn btn-sm btn-favorite mb-1" data-code="' +
|
||||
// data.anime_list[i].code +
|
||||
// '"><i class="bi bi-heart-fill"></i></button>';
|
||||
tmp += '</div><!-- .card -->';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
str += tmp
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
// str += '</div><!-- .card-columns -->';
|
||||
str += m_hr_black();
|
||||
|
||||
if (page > 1) {
|
||||
|
||||
const temp = document.createElement('div')
|
||||
temp.innerHTML = str;
|
||||
while (temp.firstChild) {
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild);
|
||||
}
|
||||
page++
|
||||
|
||||
} else {
|
||||
|
||||
document.getElementById("screen_movie_list").innerHTML = str;
|
||||
|
||||
}
|
||||
|
||||
$("img.lazyload").lazyload({
|
||||
threshold: 10,
|
||||
effect: "fadeIn",
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function make_search_result_list(data, page) {
|
||||
let str = ''
|
||||
let tmp = ''
|
||||
|
||||
console.log(data.anime_list, page)
|
||||
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
str += '<div class="card-columns">'
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
for (let i in data.anime_list) {
|
||||
if (data.anime_list[i].wr_id !== '') {
|
||||
const re = /bo_table=([^&]+)/
|
||||
const bo_table = data.anime_list[i].link.match(re)
|
||||
console.log(bo_table)
|
||||
|
||||
request_url = './request?code=' + data.anime_list[i].code + '&wr_id=' + data.anime_list[i].wr_id + '&bo_table=' + bo_table[1]
|
||||
} else {
|
||||
request_url = './request?code=' + data.anime_list[i].code
|
||||
}
|
||||
|
||||
tmp = '<div class="col-sm-4">';
|
||||
tmp += '<div class="card">';
|
||||
tmp += '<img class="card-img-top" src="' + data.anime_list[i].image_link + '" />';
|
||||
tmp += '<div class="card-body">'
|
||||
// {#tmp += '<button id="code_button" data-code="' + data.episode[i].code + '" type="button" class="btn btn-primary code-button bootstrap-tooltip" data-toggle="button" data-tooltip="true" aria-pressed="true" autocomplete="off" data-placement="top">' +#}
|
||||
// {# '<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 += '<a href="' + request_url + '" class="btn btn-primary cut-text">' + data.anime_list[i].title + '</a>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
tmp += '</div>';
|
||||
str += tmp
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
str += '</div><!-- .card-columns -->';
|
||||
str += m_hr_black();
|
||||
|
||||
if (page > 1) {
|
||||
|
||||
const temp = document.createElement('div')
|
||||
temp.innerHTML = str;
|
||||
while (temp.firstChild) {
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild);
|
||||
}
|
||||
page++
|
||||
|
||||
} else {
|
||||
document.getElementById("screen_movie_list").innerHTML = str;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function make_screen_movie_list(data, page) {
|
||||
let str = ''
|
||||
let tmp = ''
|
||||
|
||||
console.log(data.anime_list, page)
|
||||
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
// str += '<div class="card-columns">'
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
for (let i in data.anime_list) {
|
||||
|
||||
tmp = '<div class="col-sm-4">';
|
||||
tmp += '<div class="card">';
|
||||
tmp += '<img class="card-img-top" src="' + data.anime_list[i].image_link + '" />';
|
||||
tmp += '<div class="card-body">'
|
||||
tmp += '<h5 class="card-title">' + data.anime_list[i].title + '</h5>';
|
||||
tmp += '<p class="card-text">' + data.anime_list[i].code + '</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>';
|
||||
tmp += '</div>';
|
||||
str += tmp
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
// str += '</div><!-- .card-columns -->';
|
||||
str += m_hr_black();
|
||||
|
||||
if (page > 1) {
|
||||
|
||||
const temp = document.createElement('div')
|
||||
temp.innerHTML = str;
|
||||
while (temp.firstChild) {
|
||||
document.getElementById("screen_movie_list").appendChild(temp.firstChild);
|
||||
}
|
||||
page++
|
||||
|
||||
} else {
|
||||
document.getElementById("screen_movie_list").innerHTML = str;
|
||||
}
|
||||
|
||||
$("img.lazyload").lazyload({
|
||||
threshold: 10,
|
||||
effect: "fadeIn",
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// if ( "{{arg['linkkf_current_code']}}" !== "" ) {
|
||||
// document.getElementById("code").value = "{{arg['linkkf_current_code']}}";
|
||||
// // 값이 공백이 아니면 분석 버튼 계속 누름
|
||||
// document.getElementById("analysis_btn").click();
|
||||
// }
|
||||
$("#input_search").keydown(function (key) {
|
||||
if (key.keyCode === 13) {
|
||||
// alert("엔터키를 눌렀습니다.");
|
||||
$("#btn_search").trigger("click");
|
||||
}
|
||||
})
|
||||
|
||||
get_anime_list("ing", 1)
|
||||
|
||||
|
||||
const observer = lozad('.lozad', {
|
||||
rootMargin: '10px 0px', // syntax similar to that of CSS Margin
|
||||
threshold: 0.1, // ratio of element convergence
|
||||
enableAutoReload: true // it will reload the new image when validating attributes changes
|
||||
});
|
||||
observer.observe();
|
||||
|
||||
});
|
||||
|
||||
$("body").on("click", "#btn_search", function (e) {
|
||||
e.preventDefault();
|
||||
let query = $("#input_search").val();
|
||||
console.log(query);
|
||||
current_cate = "search"
|
||||
current_query = query
|
||||
|
||||
if ($("#input_search").val() === "") {
|
||||
console.log("search keyword nothing");
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "/" + package_name + "/ajax/" + sub + "/search",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {query: query, type: current_cate, page: page},
|
||||
// dataType: "json",
|
||||
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
success: function (ret) {
|
||||
if (ret.ret) {
|
||||
console.log('ret:::', ret)
|
||||
make_search_result_list(ret.data, 1);
|
||||
next_page = page + 1
|
||||
} else {
|
||||
$.notify("<strong>분석 실패</strong><br>" + ret.log, {
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$('#anime_category #ing').on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
get_anime_list("ing", 1)
|
||||
})
|
||||
|
||||
$('#anime_category #complete_anilist').on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
get_anime_list("fin", 1)
|
||||
})
|
||||
|
||||
$('#anime_category #theater').on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
get_anime_list("theater", 1)
|
||||
})
|
||||
|
||||
// 분석 버튼 클릭시 호출
|
||||
$("body").on('click', '#analysis_btn', function (e) {
|
||||
e.preventDefault();
|
||||
const code = document.getElementById("code").value
|
||||
console.log(code)
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {code: code},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret === 'success' && ret.data != null) {
|
||||
// console.log(ret.code)
|
||||
console.log(ret.data)
|
||||
make_program(ret.data)
|
||||
} else {
|
||||
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("body").on('click', '#go_linkkf_btn', function (e) {
|
||||
e.preventDefault();
|
||||
window.open("{{arg['linkkf_url']}}", "_blank");
|
||||
});
|
||||
|
||||
$("body").on("click", "#add_whitelist", function (e) {
|
||||
e.preventDefault();
|
||||
let data_code = $(this).attr("data-code");
|
||||
console.log(data_code);
|
||||
$.ajax({
|
||||
url: "/" + package_name + "/ajax/"+sub+"/add_whitelist",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: JSON.stringify({data_code: data_code}),
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret) {
|
||||
$.notify("<strong>추가하였습니다.</strong><br>", {
|
||||
type: "success",
|
||||
});
|
||||
// make_program(ret);
|
||||
} else {
|
||||
$.notify("<strong>추가 실패</strong><br>" + ret.log, {
|
||||
type: "warning",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#all_check_on_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$('input[id^="checkbox_"]').bootstrapToggle('on')
|
||||
});
|
||||
|
||||
$("body").on('click', '#all_check_off_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$('input[id^="checkbox_"]').bootstrapToggle('off')
|
||||
});
|
||||
|
||||
$("body").on('click', '#add_queue_btn', function (e) {
|
||||
e.preventDefault();
|
||||
data = current_data.episode[$(this).data('idx')];
|
||||
console.log('data:::>', data)
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data: JSON.stringify(data)},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.ret == 'enqueue_db_append' || data.ret == 'enqueue_db_exist') {
|
||||
$.notify('<strong>다운로드 작업을 추가 하였습니다.</strong>', {type: 'success'});
|
||||
} else if (data.ret == 'queue_exist') {
|
||||
$.notify('<strong>이미 큐에 있습니다. 삭제 후 추가하세요.</strong>', {type: 'warning'});
|
||||
} else if (data.ret == 'db_completed') {
|
||||
$.notify('<strong>DB에 완료 기록이 있습니다.</strong>', {type: 'warning'});
|
||||
} else {
|
||||
$.notify('<strong>추가 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
// const observer = lozad();
|
||||
// const el = document.querySelector('img');
|
||||
// const observer = lozad(el); // passing a `NodeList` (e.g. `document.querySelectorAll()`) is also valid
|
||||
// observer.observe();
|
||||
const loadNextAnimes = (cate, page) => {
|
||||
spinner.style.display = "block";
|
||||
let data = {type: cate, page: String(page)};
|
||||
let url = ''
|
||||
switch (cate) {
|
||||
case 'ing':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'ing'
|
||||
break;
|
||||
case 'movie':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/screen_movie_list'
|
||||
current_cate = 'movie'
|
||||
break;
|
||||
case 'theater':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'theater'
|
||||
break;
|
||||
case 'fin':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/complete_list'
|
||||
current_cate = 'fin'
|
||||
break
|
||||
case 'search':
|
||||
url = "/" + package_name + "/ajax/" + sub + "/search"
|
||||
current_cate = 'search'
|
||||
data.query = current_query
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
fetch(url, {
|
||||
method: "POST",
|
||||
cache: "no-cache",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
body: new URLSearchParams(data),
|
||||
})
|
||||
.then((res) => res.json())
|
||||
.then((response) => {
|
||||
// console.log("Success:", JSON.stringify(response));
|
||||
// {#imagesContainer.appendChild()#}
|
||||
console.log("return page:::> ", String(response.page));
|
||||
// {#page = response.page#}
|
||||
if (current_cate === 'search') {
|
||||
make_search_result_list(response.data, response.page);
|
||||
|
||||
} else {
|
||||
make_screen_movie_list(response.data, response.page);
|
||||
}
|
||||
page++;
|
||||
next_page++;
|
||||
})
|
||||
.catch((error) => console.error("Error:", error));
|
||||
};
|
||||
|
||||
|
||||
const onScroll = (e) => {
|
||||
console.dir(e.target.scrollingElement.scrollHeight);
|
||||
const {scrollTop, scrollHeight, clientHeight} = e.target.scrollingElement;
|
||||
if (Math.round(scrollHeight - scrollTop) <= clientHeight) {
|
||||
document.getElementById("spinner").style.display = "block";
|
||||
console.log("loading");
|
||||
console.log("now page::> ", page);
|
||||
console.log("next_page::> ", String(next_page));
|
||||
loadNextAnimes(current_cate, next_page);
|
||||
}
|
||||
};
|
||||
|
||||
const debounce = (func, delay) => {
|
||||
let timeoutId = null;
|
||||
return (...args) => {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(func.bind(null, ...args), delay);
|
||||
};
|
||||
};
|
||||
|
||||
document.addEventListener("scroll", debounce(onScroll, 300));
|
||||
</script>
|
||||
<style>
|
||||
button.code-button {
|
||||
min-width: 82px !important;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
[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;
|
||||
|
||||
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-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;
|
||||
|
||||
z-index: 9999;
|
||||
|
||||
opacity: 0;
|
||||
left: -9999px;
|
||||
top: 90%;
|
||||
|
||||
content: attr(data-tooltip-text);
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover:after {
|
||||
top: 230%;
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[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;
|
||||
|
||||
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-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;
|
||||
|
||||
z-index: 9999;
|
||||
|
||||
opacity: 0;
|
||||
left: -9999px;
|
||||
top: -210% !important;
|
||||
|
||||
content: attr(data-tooltip-text);
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover:after {
|
||||
top: 130%;
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#airing_list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cut-text {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#screen_movie_list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
padding: 1rem !important;
|
||||
}
|
||||
|
||||
button#add_whitelist {
|
||||
float: right;
|
||||
}
|
||||
|
||||
button.btn-favorite {
|
||||
background-color: #e0ff42;
|
||||
}
|
||||
/*.card-columns {*/
|
||||
/* @include media-breakpoint-only(lg) {*/
|
||||
/* column-count: 4;*/
|
||||
/* }*/
|
||||
/* @include media-breakpoint-only(xl) {*/
|
||||
/* column-count: 5;*/
|
||||
/* }*/
|
||||
/*}*/
|
||||
@media (min-width: 576px) {
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
.card-columns {
|
||||
column-count: 2;
|
||||
column-gap: 1.25rem;
|
||||
}
|
||||
.card-columns .card {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.card-columns {column-count: 3;}
|
||||
}
|
||||
|
||||
/* Large devices (desktops, 992px and up) */
|
||||
@media (min-width: 992px) {
|
||||
.card-columns {column-count: 3;}
|
||||
}
|
||||
|
||||
/* Extra large devices (large desktops, 1200px and up) */
|
||||
@media (min-width: 1200px) {
|
||||
.card-columns {
|
||||
column-count: 5;
|
||||
}
|
||||
}
|
||||
.card {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.card-columns .card {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.card-columns .card img{
|
||||
width: 100%;
|
||||
}
|
||||
button#add_whitelist {
|
||||
/*top: -70px;*/
|
||||
position: relative;
|
||||
}
|
||||
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;
|
||||
}
|
||||
body {
|
||||
background-image: linear-gradient(90deg, #233f48, #6c6fa2, #768dae);
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.1/font/bootstrap-icons.css">
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,26 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<div class="input-group mb-2">
|
||||
<!--<div id="preloader"></div>-->
|
||||
<div id="preloader" class="loader">
|
||||
<div class="loader-inner">
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
<div class="loader-line-wrap">
|
||||
<div class="loader-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="yommi_wrapper">
|
||||
<div class="input-group mb-2">
|
||||
<input
|
||||
id="input_search"
|
||||
type="search"
|
||||
@@ -9,12 +29,12 @@
|
||||
aria-label="Search"
|
||||
aria-describedby="search-addon"
|
||||
/>
|
||||
<button id="btn_search" type="button" class="btn btn-outline-primary">
|
||||
<button id="btn_search" type="button" class="btn btn-primary">
|
||||
search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<div
|
||||
id="anime_category"
|
||||
class="btn-group"
|
||||
@@ -41,6 +61,7 @@
|
||||
<form id="program_auto_form">
|
||||
<div id="episode_list"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--전체-->
|
||||
|
||||
@@ -61,6 +82,21 @@
|
||||
let current_cate = ''
|
||||
let current_query = ''
|
||||
|
||||
const loader = document.getElementById("preloader");
|
||||
|
||||
const dismissLoadingScreen = function () {
|
||||
loader.style.display = "none";
|
||||
};
|
||||
|
||||
const wait3seconds = function () {
|
||||
// REFERENCE: https://www.w3schools.com/jsref/met_win_settimeout.asp
|
||||
const result = setTimeout(dismissLoadingScreen, 2000);
|
||||
};
|
||||
|
||||
window.addEventListener("load", wait3seconds);
|
||||
// window.addEventListener("load", dismissLoadingScreen);
|
||||
|
||||
|
||||
const observer = lozad('.lozad', {
|
||||
rootMargin: '10px 0px', // syntax similar to that of CSS Margin
|
||||
threshold: 0.1, // ratio of element convergence
|
||||
@@ -194,19 +230,23 @@
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
str += '<div class="card-columns">'
|
||||
// str += '<div class="card-columns">'
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
for (let i in data.anime_list) {
|
||||
if (data.anime_list[i].wr_id !== '') {
|
||||
const re = /bo_table=([^&]+)/
|
||||
const bo_table = data.anime_list[i].link.match(re)
|
||||
// console.log(bo_table)
|
||||
console.log(bo_table)
|
||||
if (bo_table != null) {
|
||||
request_url = './request?code=' + data.anime_list[i].code + '&wr_id=' + data.anime_list[i].wr_id + '&bo_table=' + bo_table[1]
|
||||
} else {
|
||||
request_url = './request?code=' + data.anime_list[i].code
|
||||
}
|
||||
} else {
|
||||
request_url = './request?code=' + data.anime_list[i].code
|
||||
}
|
||||
|
||||
tmp = '<div class="col-sm-4">';
|
||||
tmp = '<div class="col-6 col-sm-4 col-md-3">';
|
||||
tmp += '<div class="card">';
|
||||
tmp += '<img class="card-img-top" src="' + data.anime_list[i].image_link + '" />';
|
||||
tmp += '<div class="card-body">'
|
||||
@@ -405,7 +445,7 @@
|
||||
let data_code = $(this).attr("data-code");
|
||||
console.log(data_code);
|
||||
$.ajax({
|
||||
url: "/" + package_name + "/ajax/"+sub+"/add_whitelist",
|
||||
url: "/" + package_name + "/ajax/" + sub + "/add_whitelist",
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: JSON.stringify({data_code: data_code}),
|
||||
@@ -671,6 +711,7 @@
|
||||
button.btn-favorite {
|
||||
background-color: #e0ff42;
|
||||
}
|
||||
|
||||
/*.card-columns {*/
|
||||
/* @include media-breakpoint-only(lg) {*/
|
||||
/* column-count: 4;*/
|
||||
@@ -683,10 +724,12 @@
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.card-columns {
|
||||
column-count: 2;
|
||||
column-gap: 1.25rem;
|
||||
}
|
||||
|
||||
.card-columns .card {
|
||||
display: inline-block;
|
||||
}
|
||||
@@ -694,12 +737,16 @@
|
||||
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.card-columns {column-count: 3;}
|
||||
.card-columns {
|
||||
column-count: 3;
|
||||
}
|
||||
}
|
||||
|
||||
/* Large devices (desktops, 992px and up) */
|
||||
@media (min-width: 992px) {
|
||||
.card-columns {column-count: 3;}
|
||||
.card-columns {
|
||||
column-count: 3;
|
||||
}
|
||||
}
|
||||
|
||||
/* Extra large devices (large desktops, 1200px and up) */
|
||||
@@ -707,21 +754,170 @@
|
||||
.card-columns {
|
||||
column-count: 5;
|
||||
}
|
||||
|
||||
#yommi_wrapper {
|
||||
max-width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.card-columns .card {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.card-columns .card img{
|
||||
|
||||
.card-columns .card img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
button#add_whitelist {
|
||||
/*top: -70px;*/
|
||||
position: relative;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: linear-gradient(90deg, #233f48, #6c6fa2, #768dae);
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
/*.loader {*/
|
||||
/* background: rgb(0, 0, 0, 0.8);*/
|
||||
/* background: radial-gradient(#222, #000);*/
|
||||
/* bottom: 0;*/
|
||||
/* left: 0;*/
|
||||
/* overflow: hidden;*/
|
||||
/* position: fixed;*/
|
||||
/* right: 0;*/
|
||||
/* top: 0;*/
|
||||
/* z-index: 99999;*/
|
||||
/*}*/
|
||||
|
||||
.loader-inner {
|
||||
bottom: 0;
|
||||
height: 60px;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.loader-line-wrap {
|
||||
animation: spin 2000ms cubic-bezier(.175, .885, .32, 1.275) infinite;
|
||||
box-sizing: border-box;
|
||||
height: 50px;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform-origin: 50% 100%;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.loader-line {
|
||||
border: 4px solid transparent;
|
||||
border-radius: 100%;
|
||||
box-sizing: border-box;
|
||||
height: 100px;
|
||||
left: 0;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(1) {
|
||||
animation-delay: -50ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(2) {
|
||||
animation-delay: -100ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(3) {
|
||||
animation-delay: -150ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(4) {
|
||||
animation-delay: -200ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(5) {
|
||||
animation-delay: -250ms;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(1) .loader-line {
|
||||
border-color: hsl(0, 80%, 60%);
|
||||
height: 90px;
|
||||
width: 90px;
|
||||
top: 7px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(2) .loader-line {
|
||||
border-color: hsl(60, 80%, 60%);
|
||||
height: 76px;
|
||||
width: 76px;
|
||||
top: 14px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(3) .loader-line {
|
||||
border-color: hsl(120, 80%, 60%);
|
||||
height: 62px;
|
||||
width: 62px;
|
||||
top: 21px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(4) .loader-line {
|
||||
border-color: hsl(180, 80%, 60%);
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
top: 28px;
|
||||
}
|
||||
|
||||
.loader-line-wrap:nth-child(5) .loader-line {
|
||||
border-color: hsl(240, 80%, 60%);
|
||||
height: 34px;
|
||||
width: 34px;
|
||||
top: 35px;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0%, 15% {
|
||||
transform: rotate(0);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.1/font/bootstrap-icons.css">
|
||||
{% endblock %}
|
||||
|
||||
@@ -34,6 +34,7 @@ socket.on('list_refresh', function(data){
|
||||
});
|
||||
|
||||
socket.on('status', function(data){
|
||||
console.log(data);
|
||||
on_status(data)
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<div id="preloader">
|
||||
<div class='demo'>
|
||||
<!-- <div class="loader-inner">-->
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<div class='circle'>
|
||||
<div class='inner'></div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<form id="program_list">
|
||||
{{ macros.setting_input_text_and_buttons('code', '작품 Code',
|
||||
@@ -22,6 +42,19 @@
|
||||
get: (searchParams, prop) => searchParams.get(prop),
|
||||
})
|
||||
|
||||
const loader = document.getElementById("preloader");
|
||||
|
||||
const dismissLoadingScreen = function () {
|
||||
loader.style.display = "none";
|
||||
$('.demo').css("display", "none")
|
||||
};
|
||||
|
||||
const wait3seconds = function () {
|
||||
// REFERENCE: https://www.w3schools.com/jsref/met_win_settimeout.asp
|
||||
const result = setTimeout(dismissLoadingScreen, 2000);
|
||||
};
|
||||
|
||||
window.addEventListener("load", wait3seconds);
|
||||
|
||||
|
||||
function findGetParameter(parameterName) {
|
||||
@@ -85,10 +118,9 @@
|
||||
tmp += m_row_start(2) + m_col(3, '원제', 'right') + m_col(9, data.des._otit) + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '감독', 'right') + m_col(9, data.des._dir) + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '제작사', 'right') + m_col(9, data.des._pub) + m_row_end();
|
||||
{#tmp += m_row_start(2) + m_col(3, '장르', 'right') + m_col(9, data.des._tag.join(' | ')) + m_row_end();#}
|
||||
tmp += m_row_start(2) + m_col(3, '장르', 'right') + m_col(9, data.des._tag) + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '분류', 'right') + m_col(9, data.des._classifi) + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '방영일', 'right') + m_col(9, data.date+'('+data.day+')') + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '방영일', 'right') + m_col(9, data.date + '(' + data.day + ')') + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '등급', 'right') + m_col(9, data.des._grade) + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '총화수', 'right') + m_col(9, data.des._total_chapter ? data.des._total_chapter : '') + m_row_end();
|
||||
tmp += m_row_start(2) + m_col(3, '상영시간', 'right') + m_col(9, data.des._show_time ? data.des._show_time : '') + m_row_end();
|
||||
@@ -98,21 +130,22 @@
|
||||
|
||||
str += m_hr_black();
|
||||
for (i in data.episode) {
|
||||
str += m_row_start(); tmp = '';
|
||||
str += m_row_start();
|
||||
tmp = '';
|
||||
if (data.episode[i].thumbnail)
|
||||
tmp = '<img src="'+ data.episode[i].thumbnail + '" class="img-fluid">'
|
||||
tmp = '<img src="' + data.episode[i].thumbnail + '" class="img-fluid">'
|
||||
str += m_col(3, tmp)
|
||||
tmp = '<strong>' + data.episode[i].title+ '</strong>';
|
||||
tmp = '<strong>' + data.episode[i].title + '</strong>';
|
||||
tmp += '<br>';
|
||||
tmp += data.episode[i].date + '<br>';
|
||||
|
||||
tmp += '<div class="form-inline">'
|
||||
tmp += '<input id="checkbox_'+i+'" name="checkbox_'+i+'" type="checkbox" checked data-toggle="toggle" data-on="선 택" data-off="-" data-onstyle="success" data-offstyle="danger" data-size="small"> '
|
||||
tmp += m_button('add_queue_btn', '다운로드 추가', [{'key':'idx', 'value':i}])
|
||||
tmp += '<input id="checkbox_' + i + '" name="checkbox_' + i + '" type="checkbox" checked data-toggle="toggle" data-on="선 택" data-off="-" data-onstyle="success" data-offstyle="danger" data-size="small"> '
|
||||
tmp += m_button('add_queue_btn', '다운로드 추가', [{'key': 'idx', 'value': i}])
|
||||
tmp += '</div>'
|
||||
str += m_col(9, tmp)
|
||||
str += m_row_end();
|
||||
if (i != data.length -1) str += m_hr(0);
|
||||
if (i != data.length - 1) str += m_hr(0);
|
||||
}
|
||||
document.getElementById("episode_list").innerHTML = str;
|
||||
$('input[id^="checkbox_"]').bootstrapToggle()
|
||||
@@ -129,12 +162,12 @@
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
}
|
||||
|
||||
if ( "{{arg['ohli24_current_code']}}" !== "") {
|
||||
if ("{{arg['ohli24_current_code']}}" !== "") {
|
||||
if (params.code === null) {
|
||||
console.log('params.code === null')
|
||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||
|
||||
} else if(params.code === '') {
|
||||
} else if (params.code === '') {
|
||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||
} else {
|
||||
|
||||
@@ -154,13 +187,13 @@
|
||||
|
||||
})
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function () {
|
||||
|
||||
console.log('wr_id::', params.wr_id)
|
||||
|
||||
});
|
||||
|
||||
$("#analysis_btn").unbind("click").bind('click', function(e){
|
||||
$("#analysis_btn").unbind("click").bind('click', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation()
|
||||
const code = document.getElementById("code").value
|
||||
@@ -169,7 +202,7 @@
|
||||
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {code:code},
|
||||
data: {code: code},
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret === 'success' && ret.data != null) {
|
||||
@@ -184,22 +217,22 @@
|
||||
});
|
||||
|
||||
|
||||
$("body").on('click', '#go_ohli24_btn', function(e){
|
||||
$("body").on('click', '#go_ohli24_btn', function (e) {
|
||||
e.preventDefault();
|
||||
window.open("{{arg['ohli24_url']}}", "_blank");
|
||||
});
|
||||
|
||||
$("body").on('click', '#all_check_on_btn', function(e){
|
||||
$("body").on('click', '#all_check_on_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$('input[id^="checkbox_"]').bootstrapToggle('on')
|
||||
});
|
||||
|
||||
$("body").on('click', '#all_check_off_btn', function(e){
|
||||
$("body").on('click', '#all_check_off_btn', function (e) {
|
||||
e.preventDefault();
|
||||
$('input[id^="checkbox_"]').bootstrapToggle('off')
|
||||
});
|
||||
|
||||
$("body").on('click', '#add_queue_btn', function(e){
|
||||
$("body").on('click', '#add_queue_btn', function (e) {
|
||||
e.preventDefault();
|
||||
data = current_data.episode[$(this).data('idx')];
|
||||
console.log('data:::>', data)
|
||||
@@ -207,7 +240,7 @@
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data:JSON.stringify(data)},
|
||||
data: {data: JSON.stringify(data)},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
console.log('#add_queue_btn::data >>', data)
|
||||
@@ -225,7 +258,7 @@
|
||||
|
||||
});
|
||||
|
||||
$("body").on('click', '#check_download_btn', function(e){
|
||||
$("body").on('click', '#check_download_btn', function (e) {
|
||||
e.preventDefault();
|
||||
all = $('input[id^="checkbox_"]');
|
||||
let data = [];
|
||||
@@ -244,7 +277,7 @@
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue_checked_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data:JSON.stringify(data)},
|
||||
data: {data: JSON.stringify(data)},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
$.notify('<strong>백그라운드로 작업을 추가합니다.</strong>', {type: 'success'});
|
||||
@@ -256,6 +289,7 @@
|
||||
button.code-button {
|
||||
min-width: 82px !important;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: block;
|
||||
@@ -304,6 +338,7 @@
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover {
|
||||
position: relative;
|
||||
}
|
||||
@@ -362,5 +397,151 @@
|
||||
#screen_movie_list {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/*@import url(https://fonts.googleapis.com/css?family=Lato);*/
|
||||
/*a {*/
|
||||
/* position: fixed;*/
|
||||
/* bottom: 2%;*/
|
||||
/* display: block;*/
|
||||
/* text-align: center;*/
|
||||
/* color: #0fa;*/
|
||||
/* font-family: "Lato", sans-serif;*/
|
||||
/* text-decoration: none !important;*/
|
||||
/* width: 100%;*/
|
||||
/*}*/
|
||||
|
||||
/*body, html {*/
|
||||
/* width: 100%;*/
|
||||
/* height: 100%;*/
|
||||
/* overflow: hidden;*/
|
||||
/*}*/
|
||||
|
||||
/*body {*/
|
||||
/* background: linear-gradient(90deg, #00b377, #00d68f);*/
|
||||
/* box-shadow: inset 0px 0px 90px rgba(0, 0, 0, 0.5);*/
|
||||
/* margin: 0px;*/
|
||||
/* padding: 0px;*/
|
||||
/*}*/
|
||||
|
||||
.demo {
|
||||
width: 100px;
|
||||
height: 102px;
|
||||
border-radius: 100%;
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
left: calc(50% - 50px);
|
||||
}
|
||||
|
||||
.circle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.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);
|
||||
}
|
||||
|
||||
@-webkit-keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.circle:nth-of-type(0) {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.circle:nth-of-type(0) .inner {
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user