feat(downloader): add 26 downloader APIs + detect endpoint
Deploy Scraper / build-and-deploy (push) Canceled after 0s

Port downloaders from Shirokami-API (Node.js):
- Instagram/Facebook (snapsave.app, downr.org fallback)
- TikTok (tikwm.com)
- YouTube MP4/MP3 (savetube.media, ydlp.yard.id)
- Spotify, Twitter/X (api.lrm.tube)
- Bilibili, Pinterest, MediaFire, Mega, TeraBox
- PixelDrain, Threads, DoodStream, KrakenFiles
- Danbooru, SoundCloud, Google Drive

Domain layer: DownloadResult + MediaItem entities
Application layer: 7 use-cases + detect_platform auto-detect
Infrastructure: DownloaderRepository (22 fetch functions)
Presentation: 21 handlers + DTO + OpenAPI schemas

Also: upgrade OpenTelemetry to 0.28 (axum 0.7 conflict resolution)
This commit is contained in:
asepharyana
2026-09-01 00:54:06 +07:00
parent e6d75edf33
commit 763a641593
15 changed files with 3166 additions and 181 deletions
+85
View File
@@ -155,6 +155,91 @@ pub fn build_router(app_state: Arc<AppState>) -> anyhow::Result<Router> {
)
// Proxy routes
// (all proxy routes removed)
// Downloader routes
.route(
"/download",
axum::routing::get(crate::presentation::handler::downloader::download),
)
.route(
"/download/detect",
axum::routing::get(crate::presentation::handler::downloader::detect_platform_handler),
)
.route(
"/download/instagram",
axum::routing::get(crate::presentation::handler::downloader::download_instagram),
)
.route(
"/download/facebook",
axum::routing::get(crate::presentation::handler::downloader::download_facebook),
)
.route(
"/download/tiktok",
axum::routing::get(crate::presentation::handler::downloader::download_tiktok),
)
.route(
"/download/youtube",
axum::routing::get(crate::presentation::handler::downloader::download_youtube),
)
.route(
"/download/youtube/mp3",
axum::routing::get(crate::presentation::handler::downloader::download_youtube_mp3),
)
.route(
"/download/spotify",
axum::routing::get(crate::presentation::handler::downloader::download_spotify),
)
.route(
"/download/twitter",
axum::routing::get(crate::presentation::handler::downloader::download_twitter),
)
.route(
"/download/pinterest",
axum::routing::get(crate::presentation::handler::downloader::download_pinterest),
)
.route(
"/download/mega",
axum::routing::get(crate::presentation::handler::downloader::download_mega),
)
.route(
"/download/terabox",
axum::routing::get(crate::presentation::handler::downloader::download_terabox),
)
.route(
"/download/gdrive",
axum::routing::get(crate::presentation::handler::downloader::download_gdrive),
)
.route(
"/download/mediafire",
axum::routing::get(crate::presentation::handler::downloader::download_mediafire),
)
.route(
"/download/pixeldrain",
axum::routing::get(crate::presentation::handler::downloader::download_pixeldrain),
)
.route(
"/download/threads",
axum::routing::get(crate::presentation::handler::downloader::download_threads),
)
.route(
"/download/dood",
axum::routing::get(crate::presentation::handler::downloader::download_doodstream),
)
.route(
"/download/kraken",
axum::routing::get(crate::presentation::handler::downloader::download_krakenfiles),
)
.route(
"/download/danbooru",
axum::routing::get(crate::presentation::handler::downloader::download_danbooru),
)
.route(
"/download/soundcloud",
axum::routing::get(crate::presentation::handler::downloader::download_soundcloud),
)
.route(
"/download/bilibili",
axum::routing::get(crate::presentation::handler::downloader::download_bilibili),
)
// Health
.route(
"/health",