Release v0.1.0: GDM Refactor, Rate Limit, Metallic UI
This commit is contained in:
30
downloader/__init__.py
Normal file
30
downloader/__init__.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""
|
||||
다운로더 모듈 패키지
|
||||
"""
|
||||
from typing import Optional
|
||||
from .base import BaseDownloader
|
||||
|
||||
|
||||
def get_downloader(source_type: str) -> Optional[BaseDownloader]:
|
||||
"""소스 타입에 맞는 다운로더 인스턴스 반환"""
|
||||
|
||||
if source_type in ('youtube', 'general'):
|
||||
from .ytdlp_aria2 import YtdlpAria2Downloader
|
||||
return YtdlpAria2Downloader()
|
||||
|
||||
elif source_type in ('ani24', 'linkkf', 'hls'):
|
||||
from .ffmpeg_hls import FfmpegHlsDownloader
|
||||
return FfmpegHlsDownloader()
|
||||
|
||||
elif source_type == 'anilife':
|
||||
from .anilife import AnilifeDnloader
|
||||
return AnilifeDnloader()
|
||||
|
||||
elif source_type == 'http':
|
||||
from .http_direct import HttpDirectDownloader
|
||||
return HttpDirectDownloader()
|
||||
|
||||
return None
|
||||
|
||||
|
||||
__all__ = ['get_downloader', 'BaseDownloader']
|
||||
Reference in New Issue
Block a user