Compare commits
56 Commits
bfb7436b07
...
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 | |||
| 62c790b687 | |||
| c74530b041 | |||
| 1e6e5d7d0f | |||
| 7c407afede | |||
| 12fb2e65ce | |||
| 7def5579df | |||
| 801145b625 | |||
| 209f69d0a7 | |||
| d9baf0704c | |||
| b5a56d8560 | |||
| 60fbb7a507 | |||
| ce07ca12e2 | |||
| ce1db623e6 | |||
| a9004c513b | |||
| 18f3f00098 | |||
| 0d359a184f | |||
| a63baf44f4 | |||
| 9779d82ad7 | |||
| 1bebd593f7 | |||
| 62356738bb | |||
| 4da03ab7ff | |||
| 0ad6c9c59a |
BIN
bin/Darwin/chromedriver
Executable file
BIN
bin/Darwin/chromedriver
Executable file
Binary file not shown.
BIN
bin/Linux/chromedriver
Executable file
BIN
bin/Linux/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": ""
|
||||||
|
}
|
||||||
1494
logic_anilife.py
Normal file
1494
logic_anilife.py
Normal file
File diff suppressed because it is too large
Load Diff
154
logic_linkkf.py
154
logic_linkkf.py
@@ -8,8 +8,10 @@
|
|||||||
import os, sys, traceback, re, json, threading
|
import os, sys, traceback, re, json, threading
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
# third-party
|
# third-party
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
# third-party
|
# third-party
|
||||||
from flask import request, render_template, jsonify
|
from flask import request, render_template, jsonify
|
||||||
from sqlalchemy import or_, and_, func, not_, desc
|
from sqlalchemy import or_, and_, func, not_, desc
|
||||||
@@ -18,29 +20,155 @@ from sqlalchemy import or_, and_, func, not_, desc
|
|||||||
from framework import db, scheduler, path_data, socketio
|
from framework import db, scheduler, path_data, socketio
|
||||||
from framework.util import Util
|
from framework.util import Util
|
||||||
from framework.common.util import headers
|
from framework.common.util import headers
|
||||||
from plugin import LogicModuleBase, FfmpegQueueEntity, FfmpegQueue, default_route_socketio
|
from plugin import (
|
||||||
|
LogicModuleBase,
|
||||||
|
FfmpegQueueEntity,
|
||||||
|
FfmpegQueue,
|
||||||
|
default_route_socketio,
|
||||||
|
)
|
||||||
from tool_base import d
|
from tool_base import d
|
||||||
|
|
||||||
# 패키지
|
# 패키지
|
||||||
from .plugin import P
|
from .plugin import P
|
||||||
|
|
||||||
|
|
||||||
class LogicLinkkf(LogicModuleBase):
|
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):
|
def __init__(self, P):
|
||||||
super(LogicLinkkf, self).__init__(P, 'setting', scheduler_desc='linkkf 자동 다운로드')
|
super(LogicLinkkf, self).__init__(P, "setting", scheduler_desc="linkkf 자동 다운로드")
|
||||||
self.name = 'linkkf'
|
self.name = "linkkf"
|
||||||
default_route_socketio(P, self)
|
default_route_socketio(P, self)
|
||||||
|
|
||||||
def process_menu(self, sub, req):
|
def process_menu(self, sub, req):
|
||||||
arg = P.ModelSetting.to_dict()
|
arg = P.ModelSetting.to_dict()
|
||||||
arg['sub'] = self.name
|
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:
|
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':
|
if sub == "setting":
|
||||||
job_id = '%s_%s' % (self.P.package_name, self.name)
|
job_id = "%s_%s" % (self.P.package_name, self.name)
|
||||||
arg['scheduler'] = str(scheduler.is_include(job_id))
|
arg["scheduler"] = str(scheduler.is_include(job_id))
|
||||||
arg['is_running'] = str(scheduler.is_running(job_id))
|
arg["is_running"] = str(scheduler.is_running(job_id))
|
||||||
return render_template('{package_name}_{module_name}_{sub}.html'.format(package_name=P.package_name, module_name=self.name, sub=sub), arg=arg)
|
return render_template(
|
||||||
return render_template('sample.html', title='%s - %s' % (P.package_name, sub))
|
"{package_name}_{module_name}_{sub}.html".format(
|
||||||
|
package_name=P.package_name, module_name=self.name, sub=sub
|
||||||
|
),
|
||||||
|
arg=arg,
|
||||||
|
)
|
||||||
|
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
|
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()
|
||||||
|
|||||||
475
logic_ohli24.py
475
logic_ohli24.py
@@ -7,7 +7,7 @@
|
|||||||
# @Software: PyCharm
|
# @Software: PyCharm
|
||||||
|
|
||||||
import os, sys, traceback, re, json, threading
|
import os, sys, traceback, re, json, threading
|
||||||
from datetime import datetime
|
from datetime import datetime, date
|
||||||
import copy
|
import copy
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
@@ -16,19 +16,24 @@ import requests
|
|||||||
from lxml import html
|
from lxml import html
|
||||||
from urllib import parse
|
from urllib import parse
|
||||||
import urllib
|
import urllib
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
# import aiohttp
|
||||||
|
|
||||||
# third-party
|
# third-party
|
||||||
from flask import request, render_template, jsonify
|
from flask import request, render_template, jsonify
|
||||||
from sqlalchemy import or_, and_, func, not_, desc
|
from sqlalchemy import or_, and_, func, not_, desc
|
||||||
from pip._internal import main
|
from pip._internal import main
|
||||||
|
|
||||||
pkgs = ["beautifulsoup4", "jsbeautifier"]
|
pkgs = ["beautifulsoup4", "jsbeautifier", "aiohttp"]
|
||||||
for pkg in pkgs:
|
for pkg in pkgs:
|
||||||
try:
|
try:
|
||||||
import pkg
|
import pkg
|
||||||
except ImportError:
|
except ImportError:
|
||||||
main(["install", pkg])
|
main(["install", pkg])
|
||||||
|
|
||||||
|
import aiohttp
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
import jsbeautifier
|
import jsbeautifier
|
||||||
|
|
||||||
@@ -71,6 +76,7 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
"ohli24_uncompleted_auto_enqueue": "False",
|
"ohli24_uncompleted_auto_enqueue": "False",
|
||||||
"ohli24_image_url_prefix_series": "https://www.jetcloud.cc/series/",
|
"ohli24_image_url_prefix_series": "https://www.jetcloud.cc/series/",
|
||||||
"ohli24_image_url_prefix_episode": "https://www.jetcloud-list.cc/thumbnail/",
|
"ohli24_image_url_prefix_episode": "https://www.jetcloud-list.cc/thumbnail/",
|
||||||
|
"ohli24_discord_notify": "True",
|
||||||
}
|
}
|
||||||
current_headers = None
|
current_headers = None
|
||||||
current_data = None
|
current_data = None
|
||||||
@@ -89,7 +95,7 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, P):
|
def __init__(self, P):
|
||||||
super(LogicOhli24, self).__init__(P, "setting", scheduler_desc="ani365 자동 다운로드")
|
super(LogicOhli24, self).__init__(P, "setting", scheduler_desc="ohli24 자동 다운로드")
|
||||||
self.name = "ohli24"
|
self.name = "ohli24"
|
||||||
self.queue = None
|
self.queue = None
|
||||||
default_route_socketio(P, self)
|
default_route_socketio(P, self)
|
||||||
@@ -154,7 +160,7 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
data = []
|
data = []
|
||||||
|
|
||||||
cate = request.form["type"]
|
cate = request.form["type"]
|
||||||
logger.debug("cate", cate)
|
logger.debug("cate:: %s", cate)
|
||||||
page = request.form["page"]
|
page = request.form["page"]
|
||||||
|
|
||||||
data = self.get_anime_info(cate, page)
|
data = self.get_anime_info(cate, page)
|
||||||
@@ -166,16 +172,25 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
data = []
|
data = []
|
||||||
# cate = request.form["type"]
|
# cate = request.form["type"]
|
||||||
# page = request.form["page"]
|
# page = request.form["page"]
|
||||||
|
cate = request.form["type"]
|
||||||
query = request.form["query"]
|
query = request.form["query"]
|
||||||
|
page = request.form["page"]
|
||||||
|
|
||||||
data = self.get_search_result(query)
|
data = self.get_search_result(query, page, cate)
|
||||||
# self.current_data = data
|
# self.current_data = data
|
||||||
return jsonify({"ret": "success", "query": query, "data": data})
|
return jsonify(
|
||||||
|
{
|
||||||
|
"ret": "success",
|
||||||
|
"cate": cate,
|
||||||
|
"page": page,
|
||||||
|
"query": query,
|
||||||
|
"data": data,
|
||||||
|
}
|
||||||
|
)
|
||||||
elif sub == "add_queue":
|
elif sub == "add_queue":
|
||||||
ret = {}
|
ret = {}
|
||||||
info = json.loads(request.form["data"])
|
info = json.loads(request.form["data"])
|
||||||
logger.info("info:: %s", info)
|
logger.info(f"info:: {info}")
|
||||||
ret["ret"] = self.add(info)
|
ret["ret"] = self.add(info)
|
||||||
return jsonify(ret)
|
return jsonify(ret)
|
||||||
elif sub == "entity_list":
|
elif sub == "entity_list":
|
||||||
@@ -211,10 +226,80 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
return jsonify(ModelOhli24Item.web_list(request))
|
return jsonify(ModelOhli24Item.web_list(request))
|
||||||
elif sub == "db_remove":
|
elif sub == "db_remove":
|
||||||
return jsonify(ModelOhli24Item.delete_by_id(req.form["id"]))
|
return jsonify(ModelOhli24Item.delete_by_id(req.form["id"]))
|
||||||
|
elif sub == "add_whitelist":
|
||||||
|
try:
|
||||||
|
# params = request.get_data()
|
||||||
|
# logger.debug(f"params: {params}")
|
||||||
|
# data_code = request.args.get("data_code")
|
||||||
|
params = request.get_json()
|
||||||
|
logger.debug(f"params:: {params}")
|
||||||
|
if params is not None:
|
||||||
|
code = params["data_code"]
|
||||||
|
logger.debug(f"params: {code}")
|
||||||
|
ret = LogicOhli24.add_whitelist(code)
|
||||||
|
else:
|
||||||
|
ret = LogicOhli24.add_whitelist()
|
||||||
|
return jsonify(ret)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error("Exception:%s", e)
|
||||||
|
logger.error(traceback.format_exc())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
P.logger.error("Exception:%s", e)
|
P.logger.error("Exception:%s", e)
|
||||||
P.logger.error(traceback.format_exc())
|
P.logger.error(traceback.format_exc())
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def add_whitelist(*args):
|
||||||
|
ret = {}
|
||||||
|
|
||||||
|
logger.debug(f"args: {args}")
|
||||||
|
try:
|
||||||
|
|
||||||
|
if len(args) == 0:
|
||||||
|
code = str(LogicOhli24.current_data["code"])
|
||||||
|
else:
|
||||||
|
code = str(args[0])
|
||||||
|
|
||||||
|
print(code)
|
||||||
|
|
||||||
|
whitelist_program = P.ModelSetting.get("ohli24_auto_code_list")
|
||||||
|
# whitelist_programs = [
|
||||||
|
# str(x.strip().replace(" ", ""))
|
||||||
|
# for x in whitelist_program.replace("\n", "|").split("|")
|
||||||
|
# ]
|
||||||
|
whitelist_programs = [
|
||||||
|
str(x.strip()) for x in whitelist_program.replace("\n", "|").split("|")
|
||||||
|
]
|
||||||
|
|
||||||
|
if code not in whitelist_programs:
|
||||||
|
whitelist_programs.append(code)
|
||||||
|
whitelist_programs = filter(
|
||||||
|
lambda x: x != "", whitelist_programs
|
||||||
|
) # remove blank code
|
||||||
|
whitelist_program = "|".join(whitelist_programs)
|
||||||
|
entity = (
|
||||||
|
db.session.query(P.ModelSetting)
|
||||||
|
.filter_by(key="ohli24_auto_code_list")
|
||||||
|
.with_for_update()
|
||||||
|
.first()
|
||||||
|
)
|
||||||
|
entity.value = whitelist_program
|
||||||
|
db.session.commit()
|
||||||
|
ret["ret"] = True
|
||||||
|
ret["code"] = code
|
||||||
|
if len(args) == 0:
|
||||||
|
return LogicOhli24.current_data
|
||||||
|
else:
|
||||||
|
return ret
|
||||||
|
else:
|
||||||
|
ret["ret"] = False
|
||||||
|
ret["log"] = "이미 추가되어 있습니다."
|
||||||
|
except Exception as e:
|
||||||
|
logger.error("Exception:%s", e)
|
||||||
|
logger.error(traceback.format_exc())
|
||||||
|
ret["ret"] = False
|
||||||
|
ret["log"] = str(e)
|
||||||
|
return ret
|
||||||
|
|
||||||
def setting_save_after(self):
|
def setting_save_after(self):
|
||||||
if self.queue.get_max_ffmpeg_count() != P.ModelSetting.get_int(
|
if self.queue.get_max_ffmpeg_count() != P.ModelSetting.get_int(
|
||||||
"ohli24_max_ffmpeg_process_count"
|
"ohli24_max_ffmpeg_process_count"
|
||||||
@@ -223,6 +308,75 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
P.ModelSetting.get_int("ohli24_max_ffmpeg_process_count")
|
P.ModelSetting.get_int("ohli24_max_ffmpeg_process_count")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def scheduler_function(self):
|
||||||
|
# Todo: 스케쥴링 함수 미구현
|
||||||
|
logger.debug(f"ohli24 scheduler_function::=========================")
|
||||||
|
|
||||||
|
content_code_list = P.ModelSetting.get_list("ohli24_auto_code_list", "|")
|
||||||
|
logger.debug(f"content_code_list::: {content_code_list}")
|
||||||
|
url_list = ["https://www.naver.com/", "https://www.daum.net/"]
|
||||||
|
|
||||||
|
week = ["월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"]
|
||||||
|
today = date.today()
|
||||||
|
print(today)
|
||||||
|
print()
|
||||||
|
print(today.weekday())
|
||||||
|
|
||||||
|
url = f'{P.ModelSetting.get("ohli24_url")}/bbs/board.php?bo_table=ing&sca={week[today.weekday()]}'
|
||||||
|
|
||||||
|
# print(url)
|
||||||
|
|
||||||
|
if "all" in content_code_list:
|
||||||
|
ret_data = LogicOhli24.get_auto_anime_info(self, url=url)
|
||||||
|
|
||||||
|
logger.debug(f"today_info:: {ret_data}")
|
||||||
|
|
||||||
|
for item in ret_data["anime_list"]:
|
||||||
|
# wr_id = request.form.get("wr_id", None)
|
||||||
|
# bo_table = request.form.get("bo_table", None)
|
||||||
|
wr_id = None
|
||||||
|
bo_table = None
|
||||||
|
data = []
|
||||||
|
# print(code)
|
||||||
|
# logger.info("code::: %s", code)
|
||||||
|
# logger.debug(item)
|
||||||
|
|
||||||
|
# 잠시 중지
|
||||||
|
# data = self.get_series_info(item["code"], wr_id, bo_table)
|
||||||
|
# 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:
|
||||||
|
async with session.get(url) as response:
|
||||||
|
content = await response.text()
|
||||||
|
# print(response)
|
||||||
|
return content
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
async def main(url_list: list):
|
||||||
|
input_coroutines = [LogicOhli24.get_data(url_) for url_ in url_list]
|
||||||
|
res = await asyncio.gather(*input_coroutines)
|
||||||
|
return res
|
||||||
|
|
||||||
def get_series_info(self, code, wr_id, bo_table):
|
def get_series_info(self, code, wr_id, bo_table):
|
||||||
code_type = "c"
|
code_type = "c"
|
||||||
|
|
||||||
@@ -312,25 +466,30 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
"등급": "_grade",
|
"등급": "_grade",
|
||||||
"총화수": "_total_chapter",
|
"총화수": "_total_chapter",
|
||||||
"상영시간": "_show_time",
|
"상영시간": "_show_time",
|
||||||
|
"상영일": "_release_date",
|
||||||
"개봉년도": "_release_year",
|
"개봉년도": "_release_year",
|
||||||
|
"개봉일": "_opening_date",
|
||||||
|
"런타임": "_run_time",
|
||||||
}
|
}
|
||||||
|
|
||||||
list_body_li = tree.xpath('//ul[@class="list-body"]/li')
|
list_body_li = tree.xpath('//ul[@class="list-body"]/li')
|
||||||
logger.info(list_body_li)
|
# logger.debug(f"list_body_li:: {list_body_li}")
|
||||||
episodes = []
|
episodes = []
|
||||||
vi = None
|
vi = None
|
||||||
for li in list_body_li:
|
for li in list_body_li:
|
||||||
|
# logger.debug(li)
|
||||||
title = li.xpath(".//a/text()")[0].strip()
|
title = li.xpath(".//a/text()")[0].strip()
|
||||||
thumbnail = image
|
thumbnail = image
|
||||||
logger.info(li.xpath('//a[@class="item-subject"]/@href'))
|
# logger.info(li.xpath('//a[@class="item-subject"]/@href'))
|
||||||
link = (
|
link = (
|
||||||
P.ModelSetting.get("ohli24_url")
|
P.ModelSetting.get("ohli24_url")
|
||||||
+ li.xpath('//a[@class="item-subject"]/@href')[0]
|
+ li.xpath('.//a[@class="item-subject"]/@href')[0]
|
||||||
)
|
)
|
||||||
|
# logger.debug(f"link:: {link}")
|
||||||
date = li.xpath('.//div[@class="wr-date"]/text()')[0]
|
date = li.xpath('.//div[@class="wr-date"]/text()')[0]
|
||||||
m = hashlib.md5(title.encode("utf-8"))
|
m = hashlib.md5(title.encode("utf-8"))
|
||||||
# _vi = hashlib.md5(title.encode('utf-8').hexdigest())
|
# _vi = hashlib.md5(title.encode('utf-8').hexdigest())
|
||||||
logger.info(m.hexdigest())
|
# logger.info(m.hexdigest())
|
||||||
_vi = m.hexdigest()
|
_vi = m.hexdigest()
|
||||||
episodes.append(
|
episodes.append(
|
||||||
{
|
{
|
||||||
@@ -350,13 +509,16 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
for idx, item in enumerate(des_items):
|
for idx, item in enumerate(des_items):
|
||||||
# key = des_key[idx]
|
# key = des_key[idx]
|
||||||
span = item.xpath(".//span//text()")
|
span = item.xpath(".//span//text()")
|
||||||
logger.info(span)
|
# logger.info(span)
|
||||||
key = description_dict[span[0]]
|
key = description_dict[span[0]]
|
||||||
des[key] = item.xpath(".//span/text()")[1]
|
try:
|
||||||
|
des[key] = item.xpath(".//span/text()")[1]
|
||||||
|
except IndexError:
|
||||||
|
des[key] = ""
|
||||||
|
|
||||||
logger.info(f"des::>> {des}")
|
# logger.info(f"des::>> {des}")
|
||||||
image = image.replace("..", P.ModelSetting.get("ohli24_url"))
|
image = image.replace("..", P.ModelSetting.get("ohli24_url"))
|
||||||
logger.info("images:: %s", image)
|
# logger.info("images:: %s", image)
|
||||||
logger.info("title:: %s", title)
|
logger.info("title:: %s", title)
|
||||||
|
|
||||||
ser_description = tree.xpath(
|
ser_description = tree.xpath(
|
||||||
@@ -438,17 +600,49 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
P.logger.error(traceback.format_exc())
|
P.logger.error(traceback.format_exc())
|
||||||
return {"ret": "exception", "log": str(e)}
|
return {"ret": "exception", "log": str(e)}
|
||||||
|
|
||||||
|
def get_auto_anime_info(self, url: str = ""):
|
||||||
|
try:
|
||||||
|
|
||||||
|
logger.info("url:::> %s", url)
|
||||||
|
data = {}
|
||||||
|
response_data = LogicOhli24.get_html(url, timeout=10)
|
||||||
|
tree = html.fromstring(response_data)
|
||||||
|
tmp_items = tree.xpath('//div[@class="list-row"]')
|
||||||
|
data["anime_count"] = len(tmp_items)
|
||||||
|
data["anime_list"] = []
|
||||||
|
|
||||||
|
for item in tmp_items:
|
||||||
|
entity = {}
|
||||||
|
entity["link"] = item.xpath(".//a/@href")[0]
|
||||||
|
entity["code"] = entity["link"].split("/")[-1]
|
||||||
|
entity["title"] = item.xpath(".//div[@class='post-title']/text()")[
|
||||||
|
0
|
||||||
|
].strip()
|
||||||
|
entity["image_link"] = item.xpath(".//div[@class='img-item']/img/@src")[
|
||||||
|
0
|
||||||
|
].replace("..", P.ModelSetting.get("ohli24_url"))
|
||||||
|
data["ret"] = "success"
|
||||||
|
data["anime_list"].append(entity)
|
||||||
|
|
||||||
|
return data
|
||||||
|
except Exception as e:
|
||||||
|
P.logger.error("Exception:%s", e)
|
||||||
|
P.logger.error(traceback.format_exc())
|
||||||
|
return {"ret": "exception", "log": str(e)}
|
||||||
|
|
||||||
# @staticmethod
|
# @staticmethod
|
||||||
def get_search_result(self, query):
|
def get_search_result(self, query, page, cate):
|
||||||
try:
|
try:
|
||||||
_query = urllib.parse.quote(query)
|
_query = urllib.parse.quote(query)
|
||||||
url = (
|
url = (
|
||||||
P.ModelSetting.get("ohli24_url")
|
P.ModelSetting.get("ohli24_url")
|
||||||
+ "/bbs/search.php?srows=24&gr_id=&sfl=wr_subject&stx="
|
+ "/bbs/search.php?srows=24&gr_id=&sfl=wr_subject&stx="
|
||||||
+ _query
|
+ _query
|
||||||
|
+ "&page="
|
||||||
|
+ page
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info("url:::> %s", url)
|
logger.info("get_search_result()::url> %s", url)
|
||||||
data = {}
|
data = {}
|
||||||
response_data = LogicOhli24.get_html(url, timeout=10)
|
response_data = LogicOhli24.get_html(url, timeout=10)
|
||||||
tree = html.fromstring(response_data)
|
tree = html.fromstring(response_data)
|
||||||
@@ -534,12 +728,12 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
return "queue_exist"
|
return "queue_exist"
|
||||||
else:
|
else:
|
||||||
db_entity = ModelOhli24Item.get_by_ohli24_id(episode_info["_id"])
|
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:
|
if db_entity is None:
|
||||||
entity = Ohli24QueueEntity(P, self, episode_info)
|
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())
|
ModelOhli24Item.append(entity.as_dict())
|
||||||
logger.debug("entity:: type >> %s", type(entity))
|
# logger.debug("entity:: type >> %s", type(entity))
|
||||||
|
|
||||||
self.queue.add_queue(entity)
|
self.queue.add_queue(entity)
|
||||||
return "enqueue_db_append"
|
return "enqueue_db_append"
|
||||||
@@ -598,7 +792,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
db_entity.save()
|
db_entity.save()
|
||||||
|
|
||||||
# Get episode info from OHLI24 site
|
# Get episode info from OHLI24 site
|
||||||
def make_episode_info(self):
|
def make_episode_info_old(self):
|
||||||
try:
|
try:
|
||||||
# url = 'https://ohli24.net/e/' + self.info['va']
|
# url = 'https://ohli24.net/e/' + self.info['va']
|
||||||
base_url = "https://ohli24.net"
|
base_url = "https://ohli24.net"
|
||||||
@@ -610,11 +804,11 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
ourls = parse.urlparse(url)
|
ourls = parse.urlparse(url)
|
||||||
|
|
||||||
headers = {
|
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",
|
"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("url:::> %s", url)
|
logger.debug("make_episode_info()::url==> %s", url)
|
||||||
logger.info("self.info:::> %s", self.info)
|
logger.info(f"self.info:::> {self.info}")
|
||||||
|
|
||||||
text = requests.get(url, headers=headers).text
|
text = requests.get(url, headers=headers).text
|
||||||
# logger.debug(text)
|
# logger.debug(text)
|
||||||
@@ -633,7 +827,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
iframe_src = soup2.find("iframe")["src"]
|
iframe_src = soup2.find("iframe")["src"]
|
||||||
# print(resp1)
|
# print(resp1)
|
||||||
|
|
||||||
logger.debug("iframe_src:::> %s", iframe_src)
|
logger.debug(f"iframe_src:::> {iframe_src}")
|
||||||
|
|
||||||
resp1 = requests.get(iframe_src, headers=headers, timeout=600).text
|
resp1 = requests.get(iframe_src, headers=headers, timeout=600).text
|
||||||
# logger.info('resp1::>> %s', resp1)
|
# logger.info('resp1::>> %s', resp1)
|
||||||
@@ -657,7 +851,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
# logger.info('match groups:: %s', match.groups())
|
# logger.info('match groups:: %s', match.groups())
|
||||||
# logger.info('match group3:: %s', match.group(3))
|
# logger.info('match group3:: %s', match.group(3))
|
||||||
# print('packed_script==>', packed_script)
|
# print('packed_script==>', packed_script)
|
||||||
logger.debug(unpack_script)
|
# logger.debug(unpack_script)
|
||||||
|
|
||||||
p1 = re.compile(r"(\"tracks\".*\])\,\"captions\"", re.MULTILINE | re.DOTALL)
|
p1 = re.compile(r"(\"tracks\".*\])\,\"captions\"", re.MULTILINE | re.DOTALL)
|
||||||
m2 = re.search(
|
m2 = re.search(
|
||||||
@@ -668,18 +862,18 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
# print(m2.group(1))
|
# print(m2.group(1))
|
||||||
dict_string = "{" + m2.group(1) + "}"
|
dict_string = "{" + m2.group(1) + "}"
|
||||||
|
|
||||||
logger.info("dict_string::> %s", dict_string)
|
logger.info(f"dict_string::> {dict_string}")
|
||||||
tracks = json.loads(dict_string)
|
tracks = json.loads(dict_string)
|
||||||
self.srt_url = tracks["tracks"][0]["file"]
|
self.srt_url = tracks["tracks"][0]["file"]
|
||||||
|
|
||||||
logger.debug("srt_url::: %s", tracks["tracks"][0]["file"])
|
logger.debug(f'srt_url::: {tracks["tracks"][0]["file"]}')
|
||||||
|
|
||||||
video_hash = iframe_src.split("/")
|
video_hash = iframe_src.split("/")
|
||||||
video_hashcode = re.sub(r"index\.php\?data=", "", video_hash[-1])
|
video_hashcode = re.sub(r"index\.php\?data=", "", video_hash[-1])
|
||||||
self._vi = video_hashcode
|
self._vi = video_hashcode
|
||||||
video_info_url = f"{video_hash[0]}//{video_hash[2]}/player/index.php?data={video_hashcode}&do=getVideo"
|
video_info_url = f"{video_hash[0]}//{video_hash[2]}/player/index.php?data={video_hashcode}&do=getVideo"
|
||||||
# print('hash:::', video_hash)
|
# print('hash:::', video_hash)
|
||||||
logger.debug("video_info_url::: %s", video_info_url)
|
logger.debug(f"video_info_url::: {video_info_url}")
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
"referer": f"{iframe_src}",
|
"referer": f"{iframe_src}",
|
||||||
@@ -701,7 +895,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
logger.debug("resp2::> %s", resp2)
|
logger.debug("resp2::> %s", resp2)
|
||||||
|
|
||||||
hls_url = resp2["videoSource"]
|
hls_url = resp2["videoSource"]
|
||||||
logger.debug("video_url::> %s", hls_url)
|
logger.debug(f"video_url::> {hls_url}")
|
||||||
|
|
||||||
resp3 = requests.get(hls_url, headers=headers).text
|
resp3 = requests.get(hls_url, headers=headers).text
|
||||||
# logger.debug(resp3)
|
# logger.debug(resp3)
|
||||||
@@ -709,7 +903,7 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
# stream_url = hls_url.split('\n')[-1].strip()
|
# stream_url = hls_url.split('\n')[-1].strip()
|
||||||
stream_info = resp3.split("\n")[-2:]
|
stream_info = resp3.split("\n")[-2:]
|
||||||
# logger.debug('stream_url:: %s', stream_url)
|
# logger.debug('stream_url:: %s', stream_url)
|
||||||
logger.debug("stream_info:: %s", stream_info)
|
logger.debug(f"stream_info:: {stream_info}")
|
||||||
self.headers = {
|
self.headers = {
|
||||||
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||||
"Chrome/71.0.3554.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
"Chrome/71.0.3554.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||||
@@ -719,8 +913,10 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
|
|
||||||
self.url = stream_info[1].strip()
|
self.url = stream_info[1].strip()
|
||||||
match = re.compile(r'NAME="(?P<quality>.*?)"').search(stream_info[0])
|
match = re.compile(r'NAME="(?P<quality>.*?)"').search(stream_info[0])
|
||||||
self.quality = match.group("quality")
|
self.quality = "720P"
|
||||||
logger.info(self.quality)
|
if match is not None:
|
||||||
|
self.quality = match.group("quality")
|
||||||
|
logger.info(self.quality)
|
||||||
|
|
||||||
match = re.compile(
|
match = re.compile(
|
||||||
r"(?P<title>.*?)\s*((?P<season>\d+)%s)?\s*((?P<epi_no>\d+)%s)"
|
r"(?P<title>.*?)\s*((?P<season>\d+)%s)?\s*((?P<epi_no>\d+)%s)"
|
||||||
@@ -751,9 +947,215 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
# logger.info('self.content_title:: %s', self.content_title)
|
# logger.info('self.content_title:: %s', self.content_title)
|
||||||
self.epi_queue = epi_no
|
self.epi_queue = epi_no
|
||||||
self.filename = Util.change_text_for_use_filename(ret)
|
self.filename = Util.change_text_for_use_filename(ret)
|
||||||
logger.info("self.filename::> %s", self.filename)
|
logger.info(f"self.filename::> {self.filename}")
|
||||||
self.savepath = P.ModelSetting.get("ohli24_download_path")
|
self.savepath = P.ModelSetting.get("ohli24_download_path")
|
||||||
logger.info("self.savepath::> %s", self.savepath)
|
logger.info(f"self.savepath::> {self.savepath}")
|
||||||
|
|
||||||
|
# TODO: 완결 처리
|
||||||
|
|
||||||
|
if P.ModelSetting.get_bool("ohli24_auto_make_folder"):
|
||||||
|
if self.info["day"].find("완결") != -1:
|
||||||
|
folder_name = "%s %s" % (
|
||||||
|
P.ModelSetting.get("ohli24_finished_insert"),
|
||||||
|
self.content_title,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
folder_name = self.content_title
|
||||||
|
folder_name = Util.change_text_for_use_filename(folder_name.strip())
|
||||||
|
self.savepath = os.path.join(self.savepath, folder_name)
|
||||||
|
if P.ModelSetting.get_bool("ohli24_auto_make_season_folder"):
|
||||||
|
self.savepath = os.path.join(
|
||||||
|
self.savepath, "Season %s" % int(self.season)
|
||||||
|
)
|
||||||
|
self.filepath = os.path.join(self.savepath, self.filename)
|
||||||
|
if not os.path.exists(self.savepath):
|
||||||
|
os.makedirs(self.savepath)
|
||||||
|
|
||||||
|
from framework.common.util import write_file, convert_vtt_to_srt
|
||||||
|
|
||||||
|
srt_filepath = os.path.join(
|
||||||
|
self.savepath, self.filename.replace(".mp4", ".ko.srt")
|
||||||
|
)
|
||||||
|
|
||||||
|
if self.srt_url is not None and not os.path.exists(srt_filepath):
|
||||||
|
# vtt_data = requests.get(self.vtt, headers=headers).text
|
||||||
|
# srt_data = convert_vtt_to_srt(vtt_data)
|
||||||
|
|
||||||
|
srt_data = requests.get(self.srt_url, headers=headers).text
|
||||||
|
write_file(srt_data, srt_filepath)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
P.logger.error("Exception:%s", e)
|
||||||
|
P.logger.error(traceback.format_exc())
|
||||||
|
|
||||||
|
def make_episode_info(self):
|
||||||
|
try:
|
||||||
|
# url = 'https://ohli24.net/e/' + self.info['va']
|
||||||
|
base_url = "https://ohli24.net"
|
||||||
|
iframe_url = ""
|
||||||
|
|
||||||
|
# https://ohli24.net/e/%EB%85%B9%EC%9D%84%20%EB%A8%B9%EB%8A%94%20%EB%B9%84%EC%8A%A4%EC%BD%94%206%ED%99%94
|
||||||
|
url = self.info["va"]
|
||||||
|
|
||||||
|
ourls = parse.urlparse(url)
|
||||||
|
|
||||||
|
headers = {
|
||||||
|
"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)
|
||||||
|
logger.info(f"self.info:::> {self.info}")
|
||||||
|
|
||||||
|
text = requests.get(url, headers=headers).text
|
||||||
|
# logger.debug(text)
|
||||||
|
soup1 = BeautifulSoup(text, "lxml")
|
||||||
|
pattern = re.compile(r"url : \"\.\.(.*)\"")
|
||||||
|
script = soup1.find("script", text=pattern)
|
||||||
|
|
||||||
|
if script:
|
||||||
|
match = pattern.search(script.text)
|
||||||
|
if match:
|
||||||
|
iframe_url = match.group(1)
|
||||||
|
logger.info("iframe_url::> %s", iframe_url)
|
||||||
|
|
||||||
|
logger.debug(soup1.find("iframe"))
|
||||||
|
|
||||||
|
iframe_url = soup1.find("iframe")["src"]
|
||||||
|
logger.info("iframe_url::> %s", iframe_url)
|
||||||
|
|
||||||
|
print(base_url)
|
||||||
|
print(iframe_url)
|
||||||
|
# exit()
|
||||||
|
|
||||||
|
# resp = requests.get(iframe_url, headers=headers, timeout=20).text
|
||||||
|
# soup2 = BeautifulSoup(resp, "lxml")
|
||||||
|
# iframe_src = soup2.find("iframe")["src"]
|
||||||
|
iframe_src = iframe_url
|
||||||
|
# print(resp1)
|
||||||
|
|
||||||
|
logger.debug(f"iframe_src:::> {iframe_src}")
|
||||||
|
|
||||||
|
resp1 = requests.get(iframe_src, headers=headers, timeout=600).text
|
||||||
|
# logger.info('resp1::>> %s', resp1)
|
||||||
|
soup3 = BeautifulSoup(resp1, "lxml")
|
||||||
|
# packed_pattern = re.compile(r'\\{*(eval.+)*\\}', re.MULTILINE | re.DOTALL)
|
||||||
|
s_pattern = re.compile(r"(eval.+)", re.MULTILINE | re.DOTALL)
|
||||||
|
packed_pattern = re.compile(
|
||||||
|
r"if?.([^{}]+)\{.*(eval.+)\}.+else?.{.(eval.+)\}", re.DOTALL
|
||||||
|
)
|
||||||
|
packed_script = soup3.find("script", text=s_pattern)
|
||||||
|
# packed_script = soup3.find('script')
|
||||||
|
# logger.info('packed_script>>> %s', packed_script.text)
|
||||||
|
unpack_script = None
|
||||||
|
if packed_script is not None:
|
||||||
|
# logger.debug('zzzzzzzzzzzz')
|
||||||
|
match = packed_pattern.search(packed_script.text)
|
||||||
|
# match = re.search(packed_pattern, packed_script.text)
|
||||||
|
# logger.debug("match::: %s", match.group())
|
||||||
|
unpack_script = jsbeautifier.beautify(match.group(3))
|
||||||
|
|
||||||
|
# logger.info('match groups:: %s', match.groups())
|
||||||
|
# logger.info('match group3:: %s', match.group(3))
|
||||||
|
# print('packed_script==>', packed_script)
|
||||||
|
# logger.debug(unpack_script)
|
||||||
|
|
||||||
|
p1 = re.compile(r"(\"tracks\".*\])\,\"captions\"", re.MULTILINE | re.DOTALL)
|
||||||
|
m2 = re.search(
|
||||||
|
r"(\"tracks\".*\]).*\"captions\"",
|
||||||
|
unpack_script,
|
||||||
|
flags=re.MULTILINE | re.DOTALL,
|
||||||
|
)
|
||||||
|
# print(m2.group(1))
|
||||||
|
dict_string = "{" + m2.group(1) + "}"
|
||||||
|
|
||||||
|
logger.info(f"dict_string::> {dict_string}")
|
||||||
|
tracks = json.loads(dict_string)
|
||||||
|
self.srt_url = tracks["tracks"][0]["file"]
|
||||||
|
|
||||||
|
logger.debug(f'srt_url::: {tracks["tracks"][0]["file"]}')
|
||||||
|
|
||||||
|
video_hash = iframe_src.split("/")
|
||||||
|
video_hashcode = re.sub(r"index\.php\?data=", "", video_hash[-1])
|
||||||
|
self._vi = video_hashcode
|
||||||
|
video_info_url = f"{video_hash[0]}//{video_hash[2]}/player/index.php?data={video_hashcode}&do=getVideo"
|
||||||
|
# print('hash:::', video_hash)
|
||||||
|
logger.debug(f"video_info_url::: {video_info_url}")
|
||||||
|
|
||||||
|
headers = {
|
||||||
|
"referer": f"{iframe_src}",
|
||||||
|
"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"
|
||||||
|
"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",
|
||||||
|
"X-Requested-With": "XMLHttpRequest",
|
||||||
|
}
|
||||||
|
# print(headers)
|
||||||
|
payload = {
|
||||||
|
"hash": video_hash[-1],
|
||||||
|
}
|
||||||
|
resp2 = requests.post(
|
||||||
|
video_info_url, headers=headers, data=payload, timeout=20
|
||||||
|
).json()
|
||||||
|
|
||||||
|
logger.debug("resp2::> %s", resp2)
|
||||||
|
|
||||||
|
hls_url = resp2["videoSource"]
|
||||||
|
logger.debug(f"video_url::> {hls_url}")
|
||||||
|
|
||||||
|
resp3 = requests.get(hls_url, headers=headers).text
|
||||||
|
# logger.debug(resp3)
|
||||||
|
|
||||||
|
# stream_url = hls_url.split('\n')[-1].strip()
|
||||||
|
stream_info = resp3.split("\n")[-2:]
|
||||||
|
# logger.debug('stream_url:: %s', stream_url)
|
||||||
|
logger.debug(f"stream_info:: {stream_info}")
|
||||||
|
self.headers = {
|
||||||
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||||
|
"Chrome/71.0.3554.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||||
|
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3554.0 Safari/537.36",
|
||||||
|
"Referer": "https://ndoodle.xyz/video/03a3655fff3e9bdea48de9f49e938e32",
|
||||||
|
}
|
||||||
|
|
||||||
|
self.url = stream_info[1].strip()
|
||||||
|
match = re.compile(r'NAME="(?P<quality>.*?)"').search(stream_info[0])
|
||||||
|
self.quality = "720P"
|
||||||
|
if match is not None:
|
||||||
|
self.quality = match.group("quality")
|
||||||
|
logger.info(self.quality)
|
||||||
|
|
||||||
|
match = re.compile(
|
||||||
|
r"(?P<title>.*?)\s*((?P<season>\d+)%s)?\s*((?P<epi_no>\d+)%s)"
|
||||||
|
% ("기", "화")
|
||||||
|
).search(self.info["title"])
|
||||||
|
|
||||||
|
# epi_no 초기값
|
||||||
|
epi_no = 1
|
||||||
|
|
||||||
|
if match:
|
||||||
|
self.content_title = match.group("title").strip()
|
||||||
|
if "season" in match.groupdict() and match.group("season") is not None:
|
||||||
|
self.season = int(match.group("season"))
|
||||||
|
|
||||||
|
# epi_no = 1
|
||||||
|
epi_no = int(match.group("epi_no"))
|
||||||
|
ret = "%s.S%sE%s.%s-OHNI24.mp4" % (
|
||||||
|
self.content_title,
|
||||||
|
"0%s" % self.season if self.season < 10 else self.season,
|
||||||
|
"0%s" % epi_no if epi_no < 10 else epi_no,
|
||||||
|
self.quality,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
self.content_title = self.info["title"]
|
||||||
|
P.logger.debug("NOT MATCH")
|
||||||
|
ret = "%s.720p-OHNI24.mp4" % self.info["title"]
|
||||||
|
|
||||||
|
# logger.info('self.content_title:: %s', self.content_title)
|
||||||
|
self.epi_queue = epi_no
|
||||||
|
self.filename = Util.change_text_for_use_filename(ret)
|
||||||
|
logger.info(f"self.filename::> {self.filename}")
|
||||||
|
self.savepath = P.ModelSetting.get("ohli24_download_path")
|
||||||
|
logger.info(f"self.savepath::> {self.savepath}")
|
||||||
|
|
||||||
# TODO: 완결 처리
|
# TODO: 완결 처리
|
||||||
|
|
||||||
@@ -791,7 +1193,6 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
P.logger.error("Exception:%s", e)
|
P.logger.error("Exception:%s", e)
|
||||||
P.logger.error(traceback.format_exc())
|
P.logger.error(traceback.format_exc())
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class ModelOhli24Item(db.Model):
|
class ModelOhli24Item(db.Model):
|
||||||
|
|||||||
85
plugin.py
85
plugin.py
@@ -6,67 +6,96 @@
|
|||||||
# @Software: PyCharm
|
# @Software: PyCharm
|
||||||
|
|
||||||
import os, traceback
|
import os, traceback
|
||||||
|
|
||||||
# third-party
|
# third-party
|
||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
# sjva 공용
|
# sjva 공용
|
||||||
from framework.logger import get_logger
|
from framework.logger import get_logger
|
||||||
from framework import app, path_data
|
from framework import app, path_data
|
||||||
from framework.util import Util
|
|
||||||
from plugin import get_model_setting, Logic, default_route, PluginUtil
|
from plugin import get_model_setting, Logic, default_route, PluginUtil
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
|
|
||||||
class P(object):
|
class P(object):
|
||||||
package_name = __name__.split('.')[0]
|
package_name = __name__.split(".")[0]
|
||||||
logger = get_logger(package_name)
|
logger = get_logger(package_name)
|
||||||
blueprint = Blueprint(package_name, package_name, url_prefix='/%s' % package_name,
|
blueprint = Blueprint(
|
||||||
template_folder=os.path.join(os.path.dirname(__file__), 'templates'))
|
package_name,
|
||||||
|
package_name,
|
||||||
|
url_prefix="/%s" % package_name,
|
||||||
|
template_folder=os.path.join(os.path.dirname(__file__), "templates"),
|
||||||
|
static_folder="static",
|
||||||
|
)
|
||||||
menu = {
|
menu = {
|
||||||
'main': [package_name, u'애니 다운로드'],
|
"main": [package_name, "애니 다운로드"],
|
||||||
'sub': [
|
"sub": [
|
||||||
['ohli24', u'OHLI24'], ['linkkf', u'LINKKF'], ['log', u'로그']
|
["ohli24", "OHLI24"],
|
||||||
|
["linkkf", "LINKKF"],
|
||||||
|
["anilife", "애니라이프"],
|
||||||
|
["log", "로그"],
|
||||||
],
|
],
|
||||||
'category': 'vod',
|
"category": "vod",
|
||||||
'sub2': {
|
"sub2": {
|
||||||
'ohli24': [
|
"ohli24": [
|
||||||
['setting', u'설정'], ['request', u'요청'], ['queue', u'큐'], ['category', u'분류'], ['list', u'목록']
|
["setting", "설정"],
|
||||||
|
["request", "요청"],
|
||||||
|
["queue", "큐"],
|
||||||
|
["category", "검색"],
|
||||||
|
["list", "목록"],
|
||||||
],
|
],
|
||||||
'linkkf': [
|
"linkkf": [
|
||||||
['setting', u'설정'], ['request', u'요청'], ['queue', u'큐'], ['list', u'목록']
|
["setting", "설정"],
|
||||||
|
["request", "요청"],
|
||||||
|
["queue", "큐"],
|
||||||
|
["category", "검색"],
|
||||||
|
["list", "목록"],
|
||||||
],
|
],
|
||||||
}
|
"anilife": [
|
||||||
|
["setting", "설정"],
|
||||||
|
["request", "요청"],
|
||||||
|
["category", "검색"],
|
||||||
|
["queue", "큐"],
|
||||||
|
["list", "목록"],
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
plugin_info = {
|
plugin_info = {
|
||||||
'version': '0.1.1.0',
|
"version": "0.1.2.0",
|
||||||
'name': 'anime_downloader',
|
"name": "anime_downloader",
|
||||||
'category_name': 'vod',
|
"category_name": "vod",
|
||||||
'icon': '',
|
"icon": "",
|
||||||
'developer': 'soju6jan && projectdx',
|
"developer": "soju6jan && projectdx",
|
||||||
'description': u'비디오 다운로드',
|
"description": "비디오 다운로드",
|
||||||
'home': 'http://yommi.duckdns.org:20080/projectdx/anime-downloader',
|
"home": "http://yommi.duckdns.org:20080/projectdx/anime-downloader",
|
||||||
'more': '',
|
"more": "",
|
||||||
}
|
}
|
||||||
ModelSetting = get_model_setting(package_name, logger)
|
ModelSetting = get_model_setting(package_name, logger)
|
||||||
logic = None
|
logic = None
|
||||||
module_list = None
|
module_list = None
|
||||||
home_module = 'ohli24'
|
home_module = "ohli24"
|
||||||
|
|
||||||
|
|
||||||
# 초기화 함수
|
# 초기화 함수
|
||||||
def initialize():
|
def initialize():
|
||||||
try:
|
try:
|
||||||
app.config['SQLALCHEMY_BINDS'][P.package_name] = 'sqlite:///%s' % (
|
app.config["SQLALCHEMY_BINDS"][P.package_name] = "sqlite:///%s" % (
|
||||||
os.path.join(path_data, 'db', '{package_name}.db'.format(package_name=P.package_name)))
|
os.path.join(
|
||||||
|
path_data, "db", "{package_name}.db".format(package_name=P.package_name)
|
||||||
|
)
|
||||||
|
)
|
||||||
PluginUtil.make_info_json(P.plugin_info, __file__)
|
PluginUtil.make_info_json(P.plugin_info, __file__)
|
||||||
from .logic_ohli24 import LogicOhli24
|
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), LogicLinkkf(P)]
|
||||||
P.module_list = [LogicOhli24(P)]
|
P.module_list = [LogicOhli24(P), LogicAniLife(P)]
|
||||||
P.logic = Logic(P)
|
P.logic = Logic(P)
|
||||||
default_route(P)
|
default_route(P)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
P.logger.error('Exception:%s', e)
|
P.logger.error("Exception:%s", e)
|
||||||
P.logger.error(traceback.format_exc())
|
P.logger.error(traceback.format_exc())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
23
static/ohli24/img_loader_x200.svg
Normal file
23
static/ohli24/img_loader_x200.svg
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(241, 242, 243); display: block; shape-rendering: auto;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
||||||
|
<g transform="translate(27.166666666666664,27.166666666666664)">
|
||||||
|
<rect x="-18.5" y="-18.5" width="37" height="37" fill="#85a2b6">
|
||||||
|
<animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1;1" begin="-0.3s"></animateTransform>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(72.83333333333333,27.166666666666664)">
|
||||||
|
<rect x="-18.5" y="-18.5" width="37" height="37" fill="#bbcedd">
|
||||||
|
<animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1;1" begin="-0.2s"></animateTransform>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(27.166666666666664,72.83333333333333)">
|
||||||
|
<rect x="-18.5" y="-18.5" width="37" height="37" fill="#dce4eb">
|
||||||
|
<animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1;1" begin="0s"></animateTransform>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(72.83333333333333,72.83333333333333)">
|
||||||
|
<rect x="-18.5" y="-18.5" width="37" height="37" fill="#fdfdfd">
|
||||||
|
<animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1;1" begin="-0.1s"></animateTransform>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<!-- [ldio] generated by https://loading.io/ --></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
813
templates/anime_downloader_anilife_category.html
Normal file
813
templates/anime_downloader_anilife_category.html
Normal file
@@ -0,0 +1,813 @@
|
|||||||
|
{% 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"
|
||||||
|
type="search"
|
||||||
|
class="form-control rounded"
|
||||||
|
placeholder="Search"
|
||||||
|
aria-label="Search"
|
||||||
|
aria-describedby="search-addon"
|
||||||
|
/>
|
||||||
|
<button id="btn_search" type="button" class="btn btn-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 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) => {
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
dismissLoadingScreen()
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 %}
|
||||||
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 %}
|
||||||
569
templates/anime_downloader_anilife_request.html
Normal file
569
templates/anime_downloader_anilife_request.html
Normal file
@@ -0,0 +1,569 @@
|
|||||||
|
{% 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/detail/id/101 예> 원피스 코드: 101"')
|
||||||
|
}}
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
$.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)
|
||||||
|
$("#loader").css("display", 'none')
|
||||||
|
} 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 () {
|
||||||
|
$("#loader").css("display", 'none')
|
||||||
|
// console.log('wr_id::', params.wr_id)
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#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},
|
||||||
|
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'});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("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;
|
||||||
|
}
|
||||||
|
|
||||||
|
#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 %}
|
||||||
68
templates/anime_downloader_anilife_setting.html
Normal file
68
templates/anime_downloader_anilife_setting.html
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% block content %}
|
||||||
|
<div>
|
||||||
|
{{ macros.m_button_group([['global_setting_save_btn', '설정 저장']])}}
|
||||||
|
{{ macros.m_row_start('5') }}
|
||||||
|
{{ macros.m_row_end() }}
|
||||||
|
<nav>
|
||||||
|
{{ macros.m_tab_head_start() }}
|
||||||
|
{{ macros.m_tab_head2('normal', '일반', true) }}
|
||||||
|
{{ macros.m_tab_head2('auto', '홈화면 자동', false) }}
|
||||||
|
{{ macros.m_tab_head2('action', '기타', false) }}
|
||||||
|
{{ macros.m_tab_head_end() }}
|
||||||
|
</nav>
|
||||||
|
<form id="setting">
|
||||||
|
<div class="tab-content" id="nav-tabContent">
|
||||||
|
{{ macros.m_tab_content_start('normal', true) }}
|
||||||
|
{{ macros.setting_input_text_and_buttons('anilife_url', '애니라이프 URL', [['go_btn', 'GO']], value=arg['anilife_url']) }}
|
||||||
|
{{ macros.setting_input_text('anilife_download_path', '저장 폴더', value=arg['anilife_download_path'], desc='정상적으로 다운 완료 된 파일이 이동할 폴더 입니다. ') }}
|
||||||
|
{{ macros.setting_input_int('anilife_max_ffmpeg_process_count', '동시 다운로드 수', value=arg['anilife_max_ffmpeg_process_count'], desc='동시에 다운로드 할 에피소드 갯수입니다.') }}
|
||||||
|
{{ macros.setting_checkbox('anilife_order_desc', '요청 화면 최신순 정렬', value=arg['anilife_order_desc'], desc='On : 최신화부터, Off : 1화부터') }}
|
||||||
|
{{ macros.setting_checkbox('anilife_auto_make_folder', '제목 폴더 생성', value=arg['anilife_auto_make_folder'], desc='제목으로 폴더를 생성하고 폴더 안에 다운로드합니다.') }}
|
||||||
|
<div id="anilife_auto_make_folder_div" class="collapse">
|
||||||
|
{{ macros.setting_input_text('anilife_finished_insert', '완결 표시', col='3', value=arg['anilife_finished_insert'], desc=['완결된 컨텐츠 폴더명 앞에 넣을 문구입니다.']) }}
|
||||||
|
{{ macros.setting_checkbox('anilife_auto_make_season_folder', '시즌 폴더 생성', value=arg['anilife_auto_make_season_folder'], desc=['On : Season 번호 폴더를 만듭니다.']) }}
|
||||||
|
</div>
|
||||||
|
{{ macros.setting_checkbox('anilife_uncompleted_auto_enqueue', '자동으로 다시 받기', value=arg['anilife_uncompleted_auto_enqueue'], desc=['On : 플러그인 로딩시 미완료인 항목은 자동으로 다시 받습니다.']) }}
|
||||||
|
{{ macros.m_tab_content_end() }}
|
||||||
|
|
||||||
|
{{ macros.m_tab_content_start('auto', false) }}
|
||||||
|
{{ macros.setting_global_scheduler_sub_button(arg['scheduler'], arg['is_running']) }}
|
||||||
|
{{ macros.setting_input_text('anilife_interval', '스케쥴링 실행 정보', value=arg['anilife_interval'], col='3', desc=['Inverval(minute 단위)이나 Cron 설정']) }}
|
||||||
|
{{ macros.setting_checkbox('anilife_auto_start', '시작시 자동실행', value=arg['anilife_auto_start'], desc='On : 시작시 자동으로 스케쥴러에 등록됩니다.') }}
|
||||||
|
{{ macros.setting_input_textarea('anilife_auto_code_list', '자동 다운로드할 작품 코드', desc=['all 입력시 모두 받기', '구분자 | 또는 엔터'], value=arg['anilife_auto_code_list'], row='10') }}
|
||||||
|
{{ macros.setting_checkbox('anilife_auto_mode_all', '에피소드 모두 받기', value=arg['anilife_auto_mode_all'], desc=['On : 이전 에피소드를 모두 받습니다.', 'Off : 최신 에피소드만 받습니다.']) }}
|
||||||
|
{{ macros.m_tab_content_end() }}
|
||||||
|
|
||||||
|
{{ macros.m_tab_content_start('action', false) }}
|
||||||
|
{{ macros.setting_button([['global_one_execute_sub_btn', '1회 실행']], left='1회 실행' ) }}
|
||||||
|
{{ macros.setting_button([['global_reset_db_sub_btn', 'DB 초기화']], left='DB정리' ) }}
|
||||||
|
{{ macros.m_tab_content_end() }}
|
||||||
|
|
||||||
|
</div><!--tab-content-->
|
||||||
|
</form>
|
||||||
|
</div> <!--전체-->
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var package_name = "{{arg['package_name'] }}";
|
||||||
|
var sub = "{{arg['sub'] }}";
|
||||||
|
var current_data = null;
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
use_collapse('anilife_auto_make_folder');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#ani365_auto_make_folder').change(function() {
|
||||||
|
use_collapse('anilife_auto_make_folder');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("body").on('click', '#go_btn', function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
let url = document.getElementById("anilife_url").value
|
||||||
|
window.open(url, "_blank");
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
{% 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 %}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,7 @@ socket.on('list_refresh', function(data){
|
|||||||
});
|
});
|
||||||
|
|
||||||
socket.on('status', function(data){
|
socket.on('status', function(data){
|
||||||
|
console.log(data);
|
||||||
on_status(data)
|
on_status(data)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,365 +1,547 @@
|
|||||||
{% extends "base.html" %} {% block content %}
|
{% 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>
|
<div>
|
||||||
<form id="program_list">
|
<form id="program_list">
|
||||||
{{ macros.setting_input_text_and_buttons('code', '작품 Code',
|
{{ macros.setting_input_text_and_buttons('code', '작품 Code',
|
||||||
[['analysis_btn', '분석'], ['go_ohli24_btn', 'Go OHLI24']], desc='예)
|
[['analysis_btn', '분석'], ['go_ohli24_btn', 'Go OHLI24']], desc='예)
|
||||||
"https://ohli24.net/c/녹을 먹는 비스코" 이나 "녹을 먹는 비스코"') }}
|
"https://ohli24.net/c/녹을 먹는 비스코" 이나 "녹을 먹는 비스코"') }}
|
||||||
</form>
|
</form>
|
||||||
<form id="program_auto_form">
|
<form id="program_auto_form">
|
||||||
<div id="episode_list"></div>
|
<div id="episode_list"></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<!--전체-->
|
<!--전체-->
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const package_name = "{{arg['package_name'] }}";
|
const package_name = "{{arg['package_name'] }}";
|
||||||
const sub = "{{arg['sub'] }}";
|
const sub = "{{arg['sub'] }}";
|
||||||
const ohli24_url = "{{arg['ohli24_url']}}";
|
const ohli24_url = "{{arg['ohli24_url']}}";
|
||||||
let current_data = null;
|
let current_data = null;
|
||||||
|
|
||||||
const params = new Proxy(new URLSearchParams(window.location.search), {
|
const params = new Proxy(new URLSearchParams(window.location.search), {
|
||||||
get: (searchParams, prop) => searchParams.get(prop),
|
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) {
|
||||||
|
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 findGetParameter(parameterName) {
|
function analyze(wr_id, bo_table) {
|
||||||
let result = null,
|
// e.preventDefault();
|
||||||
tmp = [];
|
const code = document.getElementById("code").value
|
||||||
const items = location.search.substr(1).split("&");
|
console.log(code)
|
||||||
for (let index = 0; index < items.length; index++) {
|
$.ajax({
|
||||||
tmp = items[index].split("=");
|
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
||||||
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
|
type: "POST",
|
||||||
}
|
cache: false,
|
||||||
return result;
|
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 analyze(wr_id, bo_table) {
|
function make_program(data) {
|
||||||
// e.preventDefault();
|
current_data = data;
|
||||||
const code = document.getElementById("code").value
|
console.log("current_data::", current_data)
|
||||||
console.log(code)
|
str = '';
|
||||||
$.ajax({
|
tmp = '<div class="form-inline">'
|
||||||
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
tmp += m_button('check_download_btn', '선택 다운로드 추가', []);
|
||||||
type: "POST",
|
tmp += m_button('all_check_on_btn', '전체 선택', []);
|
||||||
cache: false,
|
tmp += m_button('all_check_off_btn', '전체 해제', []);
|
||||||
data: {code: code, wr_id: wr_id, bo_table: bo_table},
|
/*
|
||||||
dataType: "json",
|
tmp += ' <input id="new_title" name="new_title" class="form-control form-control-sm" value="'+data.title+'">'
|
||||||
success: function (ret) {
|
tmp += '</div>'
|
||||||
if (ret.ret === 'success' && ret.data != null) {
|
tmp += m_button('apply_new_title_btn', '저장폴더명, 파일명 제목 변경', []);
|
||||||
// {#console.log(ret.code)#}
|
tmp += m_button('search_tvdb_btn', 'TVDB', []);
|
||||||
console.log(ret.data)
|
tmp = m_button_group(tmp)
|
||||||
make_program(ret.data)
|
*/
|
||||||
} else {
|
str += tmp
|
||||||
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
// 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._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) + 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._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();
|
||||||
|
tmp += m_row_start(2) + m_col(3, '줄거리', 'right') + m_col(9, data.ser_description) + m_row_end();
|
||||||
|
str += m_col(9, tmp)
|
||||||
|
str += m_row_end();
|
||||||
|
|
||||||
function make_program(data) {
|
str += m_hr_black();
|
||||||
current_data = data;
|
for (i in data.episode) {
|
||||||
console.log("current_data::", current_data)
|
str += m_row_start();
|
||||||
str = '';
|
tmp = '';
|
||||||
tmp = '<div class="form-inline">'
|
if (data.episode[i].thumbnail)
|
||||||
tmp += m_button('check_download_btn', '선택 다운로드 추가', []);
|
tmp = '<img src="' + data.episode[i].thumbnail + '" class="img-fluid">'
|
||||||
tmp += m_button('all_check_on_btn', '전체 선택', []);
|
str += m_col(3, tmp)
|
||||||
tmp += m_button('all_check_off_btn', '전체 해제', []);
|
tmp = '<strong>' + data.episode[i].title + '</strong>';
|
||||||
/*
|
tmp += '<br>';
|
||||||
tmp += ' <input id="new_title" name="new_title" class="form-control form-control-sm" value="'+data.title+'">'
|
tmp += data.episode[i].date + '<br>';
|
||||||
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._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.des._grade) + m_row_end();
|
|
||||||
tmp += m_row_start(2) + m_col(3, '총화수', 'right') + m_col(9, data.des._total_chapter) + m_row_end();
|
|
||||||
tmp += m_row_start(2) + m_col(3, '상영시간', 'right') + m_col(9, data.des._show_time) + m_row_end();
|
|
||||||
tmp += m_row_start(2) + m_col(3, '줄거리', 'right') + m_col(9, data.ser_description) + m_row_end();
|
|
||||||
str += m_col(9, tmp)
|
|
||||||
str += m_row_end();
|
|
||||||
|
|
||||||
str += m_hr_black();
|
tmp += '<div class="form-inline">'
|
||||||
for (i in data.episode) {
|
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"> '
|
||||||
str += m_row_start(); tmp = '';
|
tmp += m_button('add_queue_btn', '다운로드 추가', [{'key': 'idx', 'value': i}])
|
||||||
if (data.episode[i].thumbnail)
|
tmp += '</div>'
|
||||||
tmp = '<img src="'+ data.episode[i].thumbnail + '" class="img-fluid">'
|
str += m_col(9, tmp)
|
||||||
str += m_col(3, tmp)
|
str += m_row_end();
|
||||||
tmp = '<strong>' + data.episode[i].title+ '</strong>';
|
if (i != data.length - 1) str += m_hr(0);
|
||||||
tmp += '<br>';
|
}
|
||||||
tmp += data.episode[i].date + '<br>';
|
document.getElementById("episode_list").innerHTML = str;
|
||||||
|
$('input[id^="checkbox_"]').bootstrapToggle()
|
||||||
|
}
|
||||||
|
|
||||||
tmp += '<div class="form-inline">'
|
$(function () {
|
||||||
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"> '
|
console.log(params.wr_id)
|
||||||
tmp += m_button('add_queue_btn', '다운로드 추가', [{'key':'idx', 'value':i}])
|
console.log(findGetParameter('wr_id'))
|
||||||
tmp += '</div>'
|
console.log(params.code)
|
||||||
str += m_col(9, tmp)
|
if (params.code === '') {
|
||||||
str += m_row_end();
|
|
||||||
if (i != data.length -1) str += m_hr(0);
|
|
||||||
}
|
|
||||||
document.getElementById("episode_list").innerHTML = str;
|
|
||||||
$('input[id^="checkbox_"]').bootstrapToggle()
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function () {
|
} else {
|
||||||
console.log(params.wr_id)
|
document.getElementById("code").value = params.code
|
||||||
console.log(findGetParameter('wr_id'))
|
// {#document.getElementById("analysis_btn").click();#}
|
||||||
console.log(params.code)
|
}
|
||||||
if (params.code === '') {
|
|
||||||
|
|
||||||
} else {
|
if ("{{arg['ohli24_current_code']}}" !== "") {
|
||||||
document.getElementById("code").value = params.code
|
if (params.code === null) {
|
||||||
// {#document.getElementById("analysis_btn").click();#}
|
console.log('params.code === null')
|
||||||
}
|
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||||
|
|
||||||
if ( "{{arg['ohli24_current_code']}}" !== "") {
|
} else if (params.code === '') {
|
||||||
if (params.code === null) {
|
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
||||||
console.log('params.code === null')
|
} else {
|
||||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
|
||||||
|
|
||||||
} else if(params.code === '') {
|
console.log('params code exist')
|
||||||
document.getElementById("code").value = "{{arg['ohli24_current_code']}}";
|
console.log(params.code)
|
||||||
} else {
|
document.getElementById("code").value = params.code
|
||||||
|
|
||||||
console.log('params code exist')
|
analyze(params.wr_id, params.bo_table)
|
||||||
console.log(params.code)
|
// document.getElementById("analysis_btn").click();
|
||||||
document.getElementById("code").value = params.code
|
// $('#analysis_btn').trigger('click')
|
||||||
|
}
|
||||||
|
// 값이 공백이 아니면 분석 버튼 계속 누름
|
||||||
|
// {#document.getElementById("analysis_btn").click();#}
|
||||||
|
} else {
|
||||||
|
|
||||||
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 () {
|
||||||
|
|
||||||
$(document).ready(function(){
|
console.log('wr_id::', params.wr_id)
|
||||||
|
|
||||||
console.log('wr_id::', params.wr_id)
|
});
|
||||||
|
|
||||||
});
|
$("#analysis_btn").unbind("click").bind('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
$("#analysis_btn").unbind("click").bind('click', function(e){
|
e.stopPropagation()
|
||||||
e.preventDefault();
|
const code = document.getElementById("code").value
|
||||||
e.stopPropagation()
|
console.log(code)
|
||||||
const code = document.getElementById("code").value
|
$.ajax({
|
||||||
console.log(code)
|
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
||||||
$.ajax({
|
type: "POST",
|
||||||
url: '/' + package_name + '/ajax/' + sub + '/analysis',
|
cache: false,
|
||||||
type: "POST",
|
data: {code: code},
|
||||||
cache: false,
|
dataType: "json",
|
||||||
data: {code:code},
|
success: function (ret) {
|
||||||
dataType: "json",
|
if (ret.ret === 'success' && ret.data != null) {
|
||||||
success: function (ret) {
|
// {#console.log(ret.code)#}
|
||||||
if (ret.ret === 'success' && ret.data != null) {
|
console.log(ret.data)
|
||||||
// {#console.log(ret.code)#}
|
make_program(ret.data)
|
||||||
console.log(ret.data)
|
} else {
|
||||||
make_program(ret.data)
|
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||||
} else {
|
}
|
||||||
$.notify('<strong>분석 실패</strong><br>' + ret.log, {type: 'warning'});
|
}
|
||||||
}
|
});
|
||||||
}
|
});
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$("body").on('click', '#go_ohli24_btn', function(e){
|
$("body").on('click', '#go_ohli24_btn', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
window.open("{{arg['ohli24_url']}}", "_blank");
|
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();
|
e.preventDefault();
|
||||||
$('input[id^="checkbox_"]').bootstrapToggle('on')
|
$('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();
|
e.preventDefault();
|
||||||
$('input[id^="checkbox_"]').bootstrapToggle('off')
|
$('input[id^="checkbox_"]').bootstrapToggle('off')
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on('click', '#add_queue_btn', function(e){
|
$("body").on('click', '#add_queue_btn', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
data = current_data.episode[$(this).data('idx')];
|
data = current_data.episode[$(this).data('idx')];
|
||||||
console.log('data:::>', data)
|
console.log('data:::>', data)
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue',
|
url: '/' + package_name + '/ajax/' + sub + '/add_queue',
|
||||||
type: "POST",
|
type: "POST",
|
||||||
cache: false,
|
cache: false,
|
||||||
data: {data:JSON.stringify(data)},
|
data: {data: JSON.stringify(data)},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.ret == 'enqueue_db_append' || data.ret == 'enqueue_db_exist') {
|
console.log('#add_queue_btn::data >>', data)
|
||||||
$.notify('<strong>다운로드 작업을 추가 하였습니다.</strong>', {type: 'success'});
|
if (data.ret == 'enqueue_db_append' || data.ret == 'enqueue_db_exist') {
|
||||||
} else if (data.ret == 'queue_exist') {
|
$.notify('<strong>다운로드 작업을 추가 하였습니다.</strong>', {type: 'success'});
|
||||||
$.notify('<strong>이미 큐에 있습니다. 삭제 후 추가하세요.</strong>', {type: 'warning'});
|
} else if (data.ret == 'queue_exist') {
|
||||||
} else if (data.ret == 'db_completed') {
|
$.notify('<strong>이미 큐에 있습니다. 삭제 후 추가하세요.</strong>', {type: 'warning'});
|
||||||
$.notify('<strong>DB에 완료 기록이 있습니다.</strong>', {type: 'warning'});
|
} else if (data.ret == 'db_completed') {
|
||||||
} else {
|
$.notify('<strong>DB에 완료 기록이 있습니다.</strong>', {type: 'warning'});
|
||||||
$.notify('<strong>추가 실패</strong><br>' + ret.log, {type: 'warning'});
|
} else {
|
||||||
|
$.notify('<strong>추가 실패</strong><br>' + ret.log, {type: 'warning'});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on('click', '#check_download_btn', function(e){
|
$("body").on('click', '#check_download_btn', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
all = $('input[id^="checkbox_"]');
|
all = $('input[id^="checkbox_"]');
|
||||||
let data = [];
|
let data = [];
|
||||||
let idx;
|
let idx;
|
||||||
for (let i in all) {
|
for (let i in all) {
|
||||||
if (all[i].checked) {
|
if (all[i].checked) {
|
||||||
idx = parseInt(all[i].id.split('_')[1])
|
idx = parseInt(all[i].id.split('_')[1])
|
||||||
data.push(current_data.episode[idx]);
|
data.push(current_data.episode[idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.length == 0) {
|
if (data.length == 0) {
|
||||||
$.notify('<strong>선택하세요.</strong>', {type: 'warning'});
|
$.notify('<strong>선택하세요.</strong>', {type: 'warning'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/' + package_name + '/ajax/' + sub + '/add_queue_checked_list',
|
url: '/' + package_name + '/ajax/' + sub + '/add_queue_checked_list',
|
||||||
type: "POST",
|
type: "POST",
|
||||||
cache: false,
|
cache: false,
|
||||||
data: {data:JSON.stringify(data)},
|
data: {data: JSON.stringify(data)},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
$.notify('<strong>백그라운드로 작업을 추가합니다.</strong>', {type: 'success'});
|
$.notify('<strong>백그라운드로 작업을 추가합니다.</strong>', {type: 'success'});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
button.code-button {
|
button.code-button {
|
||||||
min-width: 82px !important;
|
min-width: 82px !important;
|
||||||
}
|
}
|
||||||
.tooltip {
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-tooltip-text]:hover {
|
.tooltip {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
[data-tooltip-text]:after {
|
[data-tooltip-text]:hover {
|
||||||
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
position: relative;
|
||||||
-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);
|
[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;
|
||||||
|
|
||||||
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
-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;
|
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||||
-moz-border-radius: 5px;
|
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||||
border-radius: 5px;
|
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||||
|
|
||||||
color: #ffffff;
|
-webkit-border-radius: 5px;
|
||||||
font-size: 12px;
|
-moz-border-radius: 5px;
|
||||||
margin-bottom: 10px;
|
border-radius: 5px;
|
||||||
padding: 7px 12px;
|
|
||||||
position: absolute;
|
|
||||||
width: auto;
|
|
||||||
min-width: 50px;
|
|
||||||
max-width: 300px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
|
|
||||||
z-index: 9999;
|
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;
|
||||||
|
|
||||||
opacity: 0;
|
z-index: 9999;
|
||||||
left: -9999px;
|
|
||||||
top: 90%;
|
|
||||||
|
|
||||||
content: attr(data-tooltip-text);
|
opacity: 0;
|
||||||
}
|
left: -9999px;
|
||||||
|
top: 90%;
|
||||||
|
|
||||||
[data-tooltip-text]:hover:after {
|
content: attr(data-tooltip-text);
|
||||||
top: 230%;
|
}
|
||||||
left: 0;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
[data-tooltip-text]:hover {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-tooltip-text]:after {
|
[data-tooltip-text]:hover:after {
|
||||||
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
top: 230%;
|
||||||
-moz-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
left: 0;
|
||||||
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
[data-tooltip-text]:hover {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
[data-tooltip-text]:after {
|
||||||
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
-webkit-transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||||
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
-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;
|
||||||
|
|
||||||
-webkit-border-radius: 5px;
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
-moz-border-radius: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
|
|
||||||
color: #ffffff;
|
-webkit-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||||
font-size: 12px;
|
-moz-box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||||
margin-bottom: 10px;
|
box-shadow: 0px 0px 3px 1px rgba(50, 50, 50, 0.4);
|
||||||
padding: 7px 12px;
|
|
||||||
position: absolute;
|
|
||||||
width: auto;
|
|
||||||
min-width: 50px;
|
|
||||||
max-width: 300px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
|
|
||||||
z-index: 9999;
|
-webkit-border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
|
||||||
opacity: 0;
|
color: #ffffff;
|
||||||
left: -9999px;
|
font-size: 12px;
|
||||||
top: -210% !important;
|
margin-bottom: 10px;
|
||||||
|
padding: 7px 12px;
|
||||||
|
position: absolute;
|
||||||
|
width: auto;
|
||||||
|
min-width: 50px;
|
||||||
|
max-width: 300px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
|
||||||
content: attr(data-tooltip-text);
|
z-index: 9999;
|
||||||
}
|
|
||||||
|
|
||||||
[data-tooltip-text]:hover:after {
|
opacity: 0;
|
||||||
top: 130%;
|
left: -9999px;
|
||||||
left: 0;
|
top: -210% !important;
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#airing_list {
|
content: attr(data-tooltip-text);
|
||||||
display: none;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.cut-text {
|
[data-tooltip-text]:hover:after {
|
||||||
text-overflow: ellipsis;
|
top: 130%;
|
||||||
overflow: hidden;
|
left: 0;
|
||||||
white-space: nowrap;
|
opacity: 1;
|
||||||
width: 100%;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#screen_movie_list {
|
#airing_list {
|
||||||
margin-top: 10px;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cut-text {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#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>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
{{ macros.setting_input_text('ohli24_finished_insert', '완결 표시', col='3', value=arg['ohli24_finished_insert'], desc=['완결된 컨텐츠 폴더명 앞에 넣을 문구입니다.']) }}
|
{{ 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 번호 폴더를 만듭니다.']) }}
|
{{ macros.setting_checkbox('ohli24_auto_make_season_folder', '시즌 폴더 생성', value=arg['ohli24_auto_make_season_folder'], desc=['On : Season 번호 폴더를 만듭니다.']) }}
|
||||||
</div>
|
</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.setting_checkbox('ohli24_uncompleted_auto_enqueue', '자동으로 다시 받기', value=arg['ohli24_uncompleted_auto_enqueue'], desc=['On : 플러그인 로딩시 미완료인 항목은 자동으로 다시 받습니다.']) }}
|
||||||
{{ macros.m_tab_content_end() }}
|
{{ macros.m_tab_content_end() }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user