v0.2.15: Fix queue item deletion bug

This commit is contained in:
2026-01-07 23:34:55 +09:00
parent d6819447d7
commit ace56dfd73
3 changed files with 16 additions and 17 deletions

View File

@@ -3,6 +3,9 @@
FlaskFarm용 범용 다운로드 매니저 플러그인입니다.
여러 다운로더 플러그인(YouTube, Anime 등)의 다운로드 요청을 통합 관리하고 큐(Queue)를 제공합니다.
## v0.2.15 변경사항 (2026-01-08)
- **삭제 로직 버그 수정**: 메모리에 실시간으로 로드된 다운로드 항목을 삭제할 때, 메모리에서 먼저 제거되어 DB 데이터가 남던 순서 오류를 수정했습니다.
## v0.2.14 변경사항 (2026-01-07)
- **FFmpeg HLS 안정화**: Ohli24 분산 호스트 환경 대응을 위해 `-http_persistent 0` 및 재연결 옵션(`-reconnect`) 추가.
- **aria2c 멀티쓰레드 활성화**: `yt-dlp`에서 `aria2c`를 외부 다운로더로 정상 호출하도록 수정하여 고속 분할 다운로드 지원.

View File

@@ -1,6 +1,6 @@
title: "GDM"
package_name: gommi_downloader_manager
version: '0.2.15'
version: '0.2.16'
description: FlaskFarm 범용 다운로더 큐 - YouTube, 애니24, 링크애니, Anilife 지원
developer: projectdx
home: https://gitea.yommi.duckdns.org/projectdx/gommi_downloader_manager

View File

@@ -145,31 +145,27 @@ class ModuleQueue(PluginModuleBase):
elif command == 'delete':
# 특정 항목 완전 삭제 (메모리 + DB)
download_id = req.form.get('id', '')
db_id_to_delete = None
# 메모리에서 삭제
# 1. DB ID 추출 및 메모리 정리
if download_id in self._downloads:
self._downloads[download_id].cancel()
task = self._downloads[download_id]
if hasattr(task, 'db_id'):
db_id_to_delete = task.db_id
task.cancel()
del self._downloads[download_id]
# DB에서 삭제 (db_XXX 형태인 경우)
# 2. DB에서 삭제 처리
if download_id.startswith('db_'):
db_id = int(download_id.replace('db_', ''))
db_id_to_delete = int(download_id.replace('db_', ''))
if db_id_to_delete:
try:
from .model import ModelDownloadItem
with F.app.app_context():
F.db.session.query(ModelDownloadItem).filter_by(id=db_id).delete()
F.db.session.query(ModelDownloadItem).filter_by(id=db_id_to_delete).delete()
F.db.session.commit()
except Exception as e:
self.P.logger.error(f'DB Delete Error: {e}')
else:
# 메모리 기반 ID에서 db_id 추출 시도
try:
task = self._downloads.get(download_id)
if task and hasattr(task, 'db_id') and task.db_id:
from .model import ModelDownloadItem
with F.app.app_context():
F.db.session.query(ModelDownloadItem).filter_by(id=task.db_id).delete()
F.db.session.commit()
self.P.logger.info(f"Deleted DB item: {db_id_to_delete}")
except Exception as e:
self.P.logger.error(f'DB Delete Error: {e}')