From 49aea1bb5450675eef177b4fd1ac35d10df42549 Mon Sep 17 00:00:00 2001 From: projectdx Date: Wed, 7 Jan 2026 15:46:53 +0900 Subject: [PATCH] v0.6.13: Fix initialization order for curl_cffi auto-install --- README.md | 3 +++ info.yaml | 2 +- setup.py | 27 ++++++++++++++------------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0586304..f690554 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,9 @@ ## ๐Ÿ“ ๋ณ€๊ฒฝ ์ด๋ ฅ (Changelog) +### v0.6.13 (2026-01-07) +- **์ดˆ๊ธฐํ™” ์ˆœ์„œ ์˜ค๋ฅ˜ ์ˆ˜์ •**: `P.logger` ์ ‘๊ทผ ์ „ `P` ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ์ด ์™„๋ฃŒ๋˜๋„๋ก `curl_cffi` ์ž๋™ ์„ค์น˜ ๋ฃจํ‹ด ์œ„์น˜ ์กฐ์ • (`NameError: name 'P' is not defined` ํ•ด๊ฒฐ) + ### v0.6.11 (2026-01-07) - **Docker ํ™˜๊ฒฝ ์ตœ์ ํ™”**: - `curl_cffi` ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ถ€์žฌ ์‹œ ์ž๋™ ์„ค์น˜(pip install) ๋ฃจํ‹ด ์ถ”๊ฐ€ diff --git a/info.yaml b/info.yaml index 3b433b2..30397c1 100644 --- a/info.yaml +++ b/info.yaml @@ -1,5 +1,5 @@ title: "์• ๋‹ˆ ๋‹ค์šด๋กœ๋”" -version: "0.6.11" +version: "0.6.13" package_name: "anime_downloader" developer: "projectdx" description: "anime downloader" diff --git a/setup.py b/setup.py index d79e537..9231591 100644 --- a/setup.py +++ b/setup.py @@ -114,19 +114,6 @@ from plugin import * import os import traceback 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): def __init__(self, P): @@ -156,6 +143,20 @@ class LogicGuide(PluginModuleBase): DEFINE_DEV = True 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: if DEFINE_DEV: from .mod_ohli24 import LogicOhli24