v0.6.21: Fix Linkkf GDM delegation and extraction logic

This commit is contained in:
2026-01-07 23:31:26 +09:00
parent c4cba97a7f
commit 76be367a9e
3 changed files with 31 additions and 3 deletions

View File

@@ -81,6 +81,12 @@
## 📝 변경 이력 (Changelog) ## 📝 변경 이력 (Changelog)
### v0.6.21 (2026-01-07)
- **Linkkf GDM 연동 수정**:
- GDM 위임 전 실제 스트림 URL(m3u8) 추출 로직을 강제 호출하여 "Invalid data" 오류 해결.
- Linkkf 설정의 다운로드 방식 및 쓰레드 수를 GDM에 전달하도록 개선.
- 추출된 Referer 헤더 및 자막 정보를 GDM에 누락 없이 전달.
### v0.6.20 (2026-01-07) ### v0.6.20 (2026-01-07)
- **GDM 연동 고도화 및 버그 수정**: - **GDM 연동 고도화 및 버그 수정**:
- **App Context 오류 해결**: 백그라운드 쓰레드(일괄 추가, Camoufox 설치, 자막 합침)에서 발생하던 `RuntimeError: Working outside of application context` 수정. - **App Context 오류 해결**: 백그라운드 쓰레드(일괄 추가, Camoufox 설치, 자막 합침)에서 발생하던 `RuntimeError: Working outside of application context` 수정.

View File

@@ -1,5 +1,5 @@
title: "애니 다운로더" title: "애니 다운로더"
version: "0.6.20" version: "0.6.21"
package_name: "anime_downloader" package_name: "anime_downloader"
developer: "projectdx" developer: "projectdx"
description: "anime downloader" description: "anime downloader"

View File

@@ -1578,18 +1578,37 @@ class LogicLinkkf(AnimeModuleBase):
# 4. Try GDM if available (like Ohli24/Anilife) # 4. Try GDM if available (like Ohli24/Anilife)
if ModuleQueue is not None: if ModuleQueue is not None:
entity = LinkkfQueueEntity(P, self, episode_info) entity = LinkkfQueueEntity(P, self, episode_info)
# URL 추출 수행 (GDM 위임을 위해 필수)
try:
entity.prepare_extra()
if not entity.url or entity.url == entity.playid_url:
logger.error("Failed to extract Linkkf video URL")
return "extract_failed"
except Exception as e:
logger.error(f"Linkkf extraction error: {e}")
return "extract_failed"
logger.debug("entity:::> %s", entity.as_dict()) logger.debug("entity:::> %s", entity.as_dict())
# Save to DB first # Save to DB first
if db_entity is None: if db_entity is None:
ModelLinkkfItem.append(entity.as_dict()) ModelLinkkfItem.append(entity.as_dict())
# 설정에서 다운로드 방식 및 쓰레드 수 읽기
download_method = P.ModelSetting.get("linkkf_download_method") or "ytdlp"
download_threads = P.ModelSetting.get_int("linkkf_download_threads") or 16
gdm_source_type = "linkkf"
if download_method in ['ytdlp', 'aria2c']:
gdm_source_type = "general"
# Prepare GDM options # Prepare GDM options
gdm_options = { gdm_options = {
"url": entity.url, "url": entity.url,
"save_path": entity.savepath, "save_path": entity.savepath,
"filename": entity.filename, "filename": entity.filename,
"source_type": "linkkf", "source_type": gdm_source_type,
"caller_plugin": f"{P.package_name}_{self.name}", "caller_plugin": f"{P.package_name}_{self.name}",
"callback_id": episode_info["_id"], "callback_id": episode_info["_id"],
"title": entity.filename or episode_info.get('title'), "title": entity.filename or episode_info.get('title'),
@@ -1600,11 +1619,14 @@ class LogicLinkkf(AnimeModuleBase):
"episode": entity.epi_queue, "episode": entity.epi_queue,
"source": "linkkf" "source": "linkkf"
}, },
"headers": entity.headers,
"subtitles": entity.vtt,
"connections": download_threads,
} }
task = ModuleQueue.add_download(**gdm_options) task = ModuleQueue.add_download(**gdm_options)
if task: if task:
logger.info(f"Delegated Linkkf download to GDM: {entity.filename}") logger.info(f"Delegated Linkkf download to GDM: {entity.filename} (Method: {download_method})")
return "enqueue_gdm_success" return "enqueue_gdm_success"
# 5. Fallback to FfmpegQueue if GDM not available # 5. Fallback to FfmpegQueue if GDM not available