v0.6.13: Fix initialization order for curl_cffi auto-install
This commit is contained in:
@@ -81,6 +81,9 @@
|
|||||||
|
|
||||||
## 📝 변경 이력 (Changelog)
|
## 📝 변경 이력 (Changelog)
|
||||||
|
|
||||||
|
### v0.6.13 (2026-01-07)
|
||||||
|
- **초기화 순서 오류 수정**: `P.logger` 접근 전 `P` 인스턴스 생성이 완료되도록 `curl_cffi` 자동 설치 루틴 위치 조정 (`NameError: name 'P' is not defined` 해결)
|
||||||
|
|
||||||
### v0.6.11 (2026-01-07)
|
### v0.6.11 (2026-01-07)
|
||||||
- **Docker 환경 최적화**:
|
- **Docker 환경 최적화**:
|
||||||
- `curl_cffi` 라이브러리 부재 시 자동 설치(pip install) 루틴 추가
|
- `curl_cffi` 라이브러리 부재 시 자동 설치(pip install) 루틴 추가
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
title: "애니 다운로더"
|
title: "애니 다운로더"
|
||||||
version: "0.6.11"
|
version: "0.6.13"
|
||||||
package_name: "anime_downloader"
|
package_name: "anime_downloader"
|
||||||
developer: "projectdx"
|
developer: "projectdx"
|
||||||
description: "anime downloader"
|
description: "anime downloader"
|
||||||
|
|||||||
27
setup.py
27
setup.py
@@ -114,19 +114,6 @@ from plugin import *
|
|||||||
import os
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
from flask import render_template
|
from flask import render_template
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# curl_cffi 자동 설치 루틴
|
|
||||||
try:
|
|
||||||
import curl_cffi
|
|
||||||
except ImportError:
|
|
||||||
try:
|
|
||||||
P.logger.info("curl_cffi not found. Attempting to install...")
|
|
||||||
subprocess.check_call([sys.executable, "-m", "pip", "install", "curl-cffi"])
|
|
||||||
P.logger.info("curl_cffi installed successfully.")
|
|
||||||
except Exception as e:
|
|
||||||
P.logger.error(f"Failed to install curl_cffi: {e}")
|
|
||||||
|
|
||||||
class LogicLog(PluginModuleBase):
|
class LogicLog(PluginModuleBase):
|
||||||
def __init__(self, P):
|
def __init__(self, P):
|
||||||
@@ -156,6 +143,20 @@ class LogicGuide(PluginModuleBase):
|
|||||||
DEFINE_DEV = True
|
DEFINE_DEV = True
|
||||||
|
|
||||||
P = create_plugin_instance(setting)
|
P = create_plugin_instance(setting)
|
||||||
|
|
||||||
|
# curl_cffi 자동 설치 루틴
|
||||||
|
try:
|
||||||
|
import curl_cffi
|
||||||
|
except ImportError:
|
||||||
|
try:
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
P.logger.info("curl_cffi not found. Attempting to install...")
|
||||||
|
subprocess.check_call([sys.executable, "-m", "pip", "install", "curl-cffi"])
|
||||||
|
P.logger.info("curl_cffi installed successfully.")
|
||||||
|
except Exception as e:
|
||||||
|
P.logger.error(f"Failed to install curl_cffi: {e}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if DEFINE_DEV:
|
if DEFINE_DEV:
|
||||||
from .mod_ohli24 import LogicOhli24
|
from .mod_ohli24 import LogicOhli24
|
||||||
|
|||||||
Reference in New Issue
Block a user