애니라이프 추가 및 애니24 수정
This commit is contained in:
BIN
bin/Darwin/chromedriver
Executable file
BIN
bin/Darwin/chromedriver
Executable file
Binary file not shown.
10
info.json
Normal file
10
info.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": "0.1.2.0",
|
||||
"name": "anime_downloader",
|
||||
"category_name": "vod",
|
||||
"icon": "",
|
||||
"developer": "soju6jan && projectdx",
|
||||
"description": "비디오 다운로드",
|
||||
"home": "http://yommi.duckdns.org:20080/projectdx/anime-downloader",
|
||||
"more": ""
|
||||
}
|
||||
@@ -159,7 +159,7 @@ class LogicOhli24(LogicModuleBase):
|
||||
data = []
|
||||
|
||||
cate = request.form["type"]
|
||||
logger.debug("cate", cate)
|
||||
logger.debug("cate:: %s", cate)
|
||||
page = request.form["page"]
|
||||
|
||||
data = self.get_anime_info(cate, page)
|
||||
@@ -268,15 +268,30 @@ class LogicOhli24(LogicModuleBase):
|
||||
data = []
|
||||
# print(code)
|
||||
# logger.info("code::: %s", code)
|
||||
logger.debug(item)
|
||||
# logger.debug(item)
|
||||
|
||||
# 잠시 중지
|
||||
# data = self.get_series_info(item["code"], wr_id, bo_table)
|
||||
logger.debug(data)
|
||||
# logger.debug(data)
|
||||
|
||||
# result = asyncio.run(LogicOhli24.main(url_list))
|
||||
# logger.debug(f"result:: {result}")
|
||||
|
||||
elif len(content_code_list) > 0:
|
||||
for item in content_code_list:
|
||||
url = P.ModelSetting.get("ohli24_url") + "/c/" + item
|
||||
print("scheduling url: %s", url)
|
||||
# ret_data = LogicOhli24.get_auto_anime_info(self, url=url)
|
||||
content_info = self.get_series_info(item, "", "")
|
||||
|
||||
for episode_info in content_info["episode"]:
|
||||
add_ret = self.add(episode_info)
|
||||
if add_ret.startswith("enqueue"):
|
||||
self.socketio_callback("list_refresh", "")
|
||||
# logger.debug(f"data: {data}")
|
||||
# self.current_data = data
|
||||
# db에서 다운로드 완료 유무 체크
|
||||
|
||||
@staticmethod
|
||||
async def get_data(url) -> str:
|
||||
async with aiohttp.ClientSession() as session:
|
||||
@@ -640,12 +655,12 @@ class LogicOhli24(LogicModuleBase):
|
||||
return "queue_exist"
|
||||
else:
|
||||
db_entity = ModelOhli24Item.get_by_ohli24_id(episode_info["_id"])
|
||||
logger.debug("db_entity:::> %s", db_entity)
|
||||
# logger.debug("db_entity:::> %s", db_entity)
|
||||
if db_entity is None:
|
||||
entity = Ohli24QueueEntity(P, self, episode_info)
|
||||
logger.debug("entity:::> %s", entity.as_dict())
|
||||
# logger.debug("entity:::> %s", entity.as_dict())
|
||||
ModelOhli24Item.append(entity.as_dict())
|
||||
logger.debug("entity:: type >> %s", type(entity))
|
||||
# logger.debug("entity:: type >> %s", type(entity))
|
||||
|
||||
self.queue.add_queue(entity)
|
||||
return "enqueue_db_append"
|
||||
|
||||
21
plugin.py
21
plugin.py
@@ -13,7 +13,6 @@ from flask import Blueprint
|
||||
# sjva 공용
|
||||
from framework.logger import get_logger
|
||||
from framework import app, path_data
|
||||
from framework.util import Util
|
||||
from plugin import get_model_setting, Logic, default_route, PluginUtil
|
||||
|
||||
|
||||
@@ -32,7 +31,12 @@ class P(object):
|
||||
)
|
||||
menu = {
|
||||
"main": [package_name, "애니 다운로드"],
|
||||
"sub": [["ohli24", "OHLI24"], ["linkkf", "LINKKF"], ["log", "로그"]],
|
||||
"sub": [
|
||||
["ohli24", "OHLI24"],
|
||||
["linkkf", "LINKKF"],
|
||||
["anilife", "애니라이프"],
|
||||
["log", "로그"],
|
||||
],
|
||||
"category": "vod",
|
||||
"sub2": {
|
||||
"ohli24": [
|
||||
@@ -48,10 +52,17 @@ class P(object):
|
||||
["queue", "큐"],
|
||||
["list", "목록"],
|
||||
],
|
||||
"anilife": [
|
||||
["setting", "설정"],
|
||||
["request", "요청"],
|
||||
["category", "검색"],
|
||||
["queue", "큐"],
|
||||
["list", "목록"],
|
||||
],
|
||||
},
|
||||
}
|
||||
plugin_info = {
|
||||
"version": "0.1.1.0",
|
||||
"version": "0.1.2.0",
|
||||
"name": "anime_downloader",
|
||||
"category_name": "vod",
|
||||
"icon": "",
|
||||
@@ -76,10 +87,10 @@ def initialize():
|
||||
)
|
||||
PluginUtil.make_info_json(P.plugin_info, __file__)
|
||||
from .logic_ohli24 import LogicOhli24
|
||||
from .logic_linkkf import LogicLinkkf
|
||||
from .logic_anilife import LogicAniLife
|
||||
|
||||
# P.module_list = [LogicOhli24(P), LogicLinkkf(P)]
|
||||
P.module_list = [LogicOhli24(P)]
|
||||
P.module_list = [LogicOhli24(P), LogicAniLife(P)]
|
||||
P.logic = Logic(P)
|
||||
default_route(P)
|
||||
except Exception as e:
|
||||
|
||||
656
templates/anime_downloader_anilife_category.html
Normal file
656
templates/anime_downloader_anilife_category.html
Normal file
@@ -0,0 +1,656 @@
|
||||
{% 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>
|
||||
<button id="top20" type="button" class="btn btn-grey">
|
||||
Top20
|
||||
</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 anilife_url = "{{arg['anilife_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
|
||||
case 'top20':
|
||||
url = '/' + package_name + '/ajax/' + sub + '/anime_list'
|
||||
current_cate = 'top20'
|
||||
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 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 + '</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 += 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 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 += 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 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 += 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['anilife_current_code']}}" !== "" ) {
|
||||
// document.getElementById("code").value = "{{arg['anilife_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)
|
||||
})
|
||||
|
||||
$('#anime_category #top20').on("click", function () {
|
||||
// {#console.log(this.id)#}
|
||||
let spinner = document.getElementById('spinner');
|
||||
spinner.style.visibility = 'visible';
|
||||
get_anime_list("top20", 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_anilife_btn', function (e) {
|
||||
e.preventDefault();
|
||||
window.open("{{arg['anilife_url']}}", "_blank");
|
||||
});
|
||||
|
||||
$("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;
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
[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;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
130
templates/anime_downloader_anilife_queue.html
Normal file
130
templates/anime_downloader_anilife_queue.html
Normal file
@@ -0,0 +1,130 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
{{ 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')) }}
|
||||
{{ macros.m_col(3, macros.m_strong('Status')) }}
|
||||
{{ macros.m_col(2, macros.m_strong('Action')) }}
|
||||
{{ macros.m_row_end() }}
|
||||
{{ macros.m_hr_head_bottom() }}
|
||||
<div id="download_list_div"></div>
|
||||
</div> <!--전체-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var package_name = "{{arg['package_name'] }}";
|
||||
var sub = "{{arg['sub'] }}";
|
||||
var current_data = null;
|
||||
socket = io.connect(window.location.protocol + "//" + document.domain + ":" + location.port + "/" + package_name + '/' + sub);
|
||||
|
||||
$(document).ready(function(){
|
||||
});
|
||||
|
||||
socket.on('start', function(data){
|
||||
on_start();
|
||||
});
|
||||
socket.on('list_refresh', function(data){
|
||||
on_start()
|
||||
});
|
||||
|
||||
socket.on('status', function(data){
|
||||
on_status(data)
|
||||
});
|
||||
|
||||
|
||||
function on_start() {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/entity_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
make_download_list(data)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function on_status(data) {
|
||||
//console.log(data)
|
||||
tmp = document.getElementById("progress_"+data.entity_id)
|
||||
if (tmp != null) {
|
||||
document.getElementById("progress_"+data.entity_id).style.width = data.ffmpeg_percent+ '%';
|
||||
document.getElementById("progress_"+data.entity_id+"_label").innerHTML = data.ffmpeg_status_kor + "(" + data.ffmpeg_percent + "%)" + ' ' + ((data.ffmpeg_arg != null)?data.ffmpeg_arg.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);
|
||||
str += m_col(4, (data[i].filename != null) ? data[i].filename : '');
|
||||
|
||||
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(2, 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}
|
||||
queue_command(send_data)
|
||||
});
|
||||
|
||||
$("body").on('click', '#reset_btn', function(e){
|
||||
e.preventDefault();
|
||||
entity_id = $(this).data('id')
|
||||
send_data = {'command':'reset', 'entity_id':-1}
|
||||
queue_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}
|
||||
queue_command(send_data)
|
||||
});
|
||||
|
||||
function queue_command(data) {
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/queue_command',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (ret) {
|
||||
if (ret.ret == 'notify') {
|
||||
$.notify('<strong>'+ ret.log +'</strong>', {type: 'warning'});
|
||||
}
|
||||
on_start();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("body").on('click', '#go_ffmpeg_btn', function(e){
|
||||
e.preventDefault();
|
||||
$(location).attr('href', '/ffmpeg')
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
368
templates/anime_downloader_anilife_request.html
Normal file
368
templates/anime_downloader_anilife_request.html
Normal file
@@ -0,0 +1,368 @@
|
||||
{% extends "base.html" %} {% block content %}
|
||||
|
||||
<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"') }}
|
||||
</form>
|
||||
<form id="program_auto_form">
|
||||
<div id="episode_list"></div>
|
||||
</form>
|
||||
</div>
|
||||
<!--전체-->
|
||||
|
||||
<script type="text/javascript">
|
||||
const package_name = "{{arg['package_name'] }}";
|
||||
const sub = "{{arg['sub'] }}";
|
||||
const anilife_url = "{{arg['anilife_url']}}";
|
||||
let current_data = null;
|
||||
|
||||
const params = new Proxy(new URLSearchParams(window.location.search), {
|
||||
get: (searchParams, prop) => searchParams.get(prop),
|
||||
})
|
||||
|
||||
|
||||
|
||||
function findGetParameter(parameterName) {
|
||||
let result = null,
|
||||
tmp = [];
|
||||
const items = location.search.substr(1).split("&");
|
||||
for (let index = 0; index < items.length; index++) {
|
||||
tmp = items[index].split("=");
|
||||
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function analyze(wr_id, bo_table) {
|
||||
// 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, wr_id: wr_id, bo_table: bo_table},
|
||||
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'});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function make_program(data) {
|
||||
current_data = data;
|
||||
console.log("current_data::", current_data)
|
||||
str = '';
|
||||
tmp = '<div class="form-inline">'
|
||||
tmp += m_button('check_download_btn', '선택 다운로드 추가', []);
|
||||
tmp += m_button('all_check_on_btn', '전체 선택', []);
|
||||
tmp += m_button('all_check_off_btn', '전체 해제', []);
|
||||
/*
|
||||
tmp += ' <input id="new_title" name="new_title" class="form-control form-control-sm" value="'+data.title+'">'
|
||||
tmp += '</div>'
|
||||
tmp += m_button('apply_new_title_btn', '저장폴더명, 파일명 제목 변경', []);
|
||||
tmp += m_button('search_tvdb_btn', 'TVDB', []);
|
||||
tmp = m_button_group(tmp)
|
||||
*/
|
||||
str += tmp
|
||||
// program
|
||||
str += m_hr_black();
|
||||
str += m_row_start(0);
|
||||
tmp = ''
|
||||
if (data.image != null)
|
||||
tmp = '<img src="' + data.image + '" class="img-fluid">';
|
||||
str += m_col(3, tmp)
|
||||
tmp = ''
|
||||
tmp += m_row_start(2) + m_col(3, '제목', 'right') + m_col(9, data.title) + 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._dir) + m_row_end();
|
||||
//
|
||||
// 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._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.des._total_chapter ? data.des._total_chapter : '') + 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._recent_date ? data.des._recent_date : '') + m_row_end();
|
||||
// tmp += m_row_start(2) + m_col(3, '줄거리', 'right') + m_col(9, data.ser_description) + m_row_end();
|
||||
|
||||
tmp += "<div>" + data.des1 + "</div>"
|
||||
str += m_col(9, tmp)
|
||||
str += m_row_end();
|
||||
|
||||
str += m_hr_black();
|
||||
for (i in data.episode) {
|
||||
str += m_row_start(); tmp = '';
|
||||
if (data.episode[i].thumbnail)
|
||||
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 += '<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 += '</div>'
|
||||
str += m_col(9, tmp)
|
||||
str += m_row_end();
|
||||
if (i != data.length -1) str += m_hr(0);
|
||||
}
|
||||
document.getElementById("episode_list").innerHTML = str;
|
||||
$('input[id^="checkbox_"]').bootstrapToggle()
|
||||
}
|
||||
|
||||
$(function () {
|
||||
console.log(params.wr_id)
|
||||
console.log(findGetParameter('wr_id'))
|
||||
console.log(params.code)
|
||||
if (params.code === '') {
|
||||
|
||||
} else {
|
||||
document.getElementById("code").value = params.code
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
}
|
||||
|
||||
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 === '') {
|
||||
document.getElementById("code").value = "{{arg['anilife_current_code']}}";
|
||||
} else {
|
||||
|
||||
console.log('params code exist')
|
||||
console.log(params.code)
|
||||
document.getElementById("code").value = params.code
|
||||
|
||||
analyze(params.wr_id, params.bo_table)
|
||||
// document.getElementById("analysis_btn").click();
|
||||
// $('#analysis_btn').trigger('click')
|
||||
}
|
||||
// 값이 공백이 아니면 분석 버튼 계속 누름
|
||||
// {#document.getElementById("analysis_btn").click();#}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
console.log('wr_id::', params.wr_id)
|
||||
|
||||
});
|
||||
|
||||
$("#analysis_btn").unbind("click").bind('click', function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation()
|
||||
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_anilife_btn', function(e){
|
||||
e.preventDefault();
|
||||
window.open("{{arg['anilife_url']}}", "_blank");
|
||||
});
|
||||
|
||||
$("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) {
|
||||
console.log('#add_queue_btn::data >>', 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'});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$("body").on('click', '#check_download_btn', function(e){
|
||||
e.preventDefault();
|
||||
all = $('input[id^="checkbox_"]');
|
||||
let data = [];
|
||||
let idx;
|
||||
for (let i in all) {
|
||||
if (all[i].checked) {
|
||||
idx = parseInt(all[i].id.split('_')[1])
|
||||
data.push(current_data.episode[idx]);
|
||||
}
|
||||
}
|
||||
if (data.length == 0) {
|
||||
$.notify('<strong>선택하세요.</strong>', {type: 'warning'});
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue_checked_list',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data: {data:JSON.stringify(data)},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
$.notify('<strong>백그라운드로 작업을 추가합니다.</strong>', {type: 'success'});
|
||||
}
|
||||
});
|
||||
});
|
||||
</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;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -54,7 +54,7 @@
|
||||
<script type="text/javascript">
|
||||
const package_name = "{{arg['package_name'] }}";
|
||||
const sub = "{{arg['sub'] }}";
|
||||
const ohli24_url = "{{arg['ohli24_url']}}";
|
||||
const anilife_url = "{{arg['anilife_url']}}";
|
||||
let current_data = null;
|
||||
let page = 1;
|
||||
let next_page = Number
|
||||
@@ -133,10 +133,11 @@
|
||||
str += '<div>';
|
||||
str += '<button type="button" class="btn btn-info">Page <span class="badge bg-warning">' + page + '</span></button>';
|
||||
str += '</div>';
|
||||
str += '<div id="inner_screen_movie" class="row infinite-scroll">';
|
||||
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="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 + '\'"/>';
|
||||
@@ -148,11 +149,12 @@
|
||||
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>';
|
||||
// tmp += '</div>';
|
||||
str += tmp
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
// str += '</div>';
|
||||
str += '</div><!-- .card-columns -->';
|
||||
str += m_hr_black();
|
||||
|
||||
if (page > 1) {
|
||||
@@ -186,6 +188,7 @@
|
||||
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 !== '') {
|
||||
@@ -213,6 +216,7 @@
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
str += '</div><!-- .card-columns -->';
|
||||
str += m_hr_black();
|
||||
|
||||
if (page > 1) {
|
||||
@@ -239,6 +243,7 @@
|
||||
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) {
|
||||
|
||||
@@ -256,6 +261,7 @@
|
||||
|
||||
}
|
||||
str += '</div>';
|
||||
// str += '</div><!-- .card-columns -->';
|
||||
str += m_hr_black();
|
||||
|
||||
if (page > 1) {
|
||||
@@ -281,8 +287,8 @@
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
// if ( "{{arg['ohli24_current_code']}}" !== "" ) {
|
||||
// document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||
// if ( "{{arg['anilife_current_code']}}" !== "" ) {
|
||||
// document.getElementById("code").value = "{{arg['anilife_current_code']}}";
|
||||
// // 값이 공백이 아니면 분석 버튼 계속 누름
|
||||
// document.getElementById("analysis_btn").click();
|
||||
// }
|
||||
@@ -383,9 +389,9 @@
|
||||
});
|
||||
|
||||
|
||||
$("body").on('click', '#go_ohli24_btn', function (e) {
|
||||
$("body").on('click', '#go_anilife_btn', function (e) {
|
||||
e.preventDefault();
|
||||
window.open("{{arg['ohli24_url']}}", "_blank");
|
||||
window.open("{{arg['anilife_url']}}", "_blank");
|
||||
});
|
||||
|
||||
$("body").on('click', '#all_check_on_btn', function (e) {
|
||||
@@ -514,11 +520,6 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
[data-tooltip-text]:hover {
|
||||
position: relative;
|
||||
@@ -638,5 +639,49 @@
|
||||
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-columns .card {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.card-columns .card img{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
{{ 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('ani365_incompleted_auto_enqueue', '자동으로 다시 받기', value=arg['ani365_incompleted_auto_enqueue'], desc=['On : 플러그인 로딩시 미완료인 항목은 자동으로 다시 받습니다.']) }}#}-->
|
||||
{{ macros.setting_checkbox('ohli24_uncompleted_auto_enqueue', '자동으로 다시 받기', value=arg['ohli24_uncompleted_auto_enqueue'], desc=['On : 플러그인 로딩시 미완료인 항목은 자동으로 다시 받습니다.']) }}
|
||||
{{ macros.m_tab_content_end() }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user