From 17c8ad7ac727172cc7266c03dd33145803aaf4c7 Mon Sep 17 00:00:00 2001 From: LilDosto Date: Mon, 23 Nov 2026 03:45:40 +0300 Subject: [PATCH] chore: add bilingual documentation, MIT license, and clean repository for Forgejo --- .gitignore | 30 +- README.md | 164 +- build_exe.bat | 36 - core/__init__.py | 1 - core/config.py | 108 - core/dependencies.py | 297 - core/diagnostics.py | 90 - core/downloader.py | 633 -- core/history.py | 135 - core/kick.py | 216 - core/metadata.py | 193 - index.html | 13 + installer.iss | 56 - kur.bat | 12 - main.py | 31 - package-lock.json | 3190 ++++++++ package.json | 39 + postcss.config.js | 6 + public/logo.png | Bin 0 -> 355114 bytes requirements.txt | 5 - src-tauri/Cargo.lock | 6108 +++++++++++++++ src-tauri/Cargo.toml | 43 + src-tauri/build.rs | 3 + src-tauri/capabilities/default.json | 22 + src-tauri/gen/schemas/acl-manifests.json | 1 + src-tauri/gen/schemas/capabilities.json | 1 + src-tauri/gen/schemas/desktop-schema.json | 6595 +++++++++++++++++ src-tauri/gen/schemas/windows-schema.json | 6595 +++++++++++++++++ src-tauri/icons/128x128.png | Bin 0 -> 27587 bytes src-tauri/icons/128x128@2x.png | Bin 0 -> 95027 bytes src-tauri/icons/32x32.png | Bin 0 -> 2710 bytes src-tauri/icons/64x64.png | Bin 0 -> 8607 bytes src-tauri/icons/Square107x107Logo.png | Bin 0 -> 20315 bytes src-tauri/icons/Square142x142Logo.png | Bin 0 -> 32838 bytes src-tauri/icons/Square150x150Logo.png | Bin 0 -> 36221 bytes src-tauri/icons/Square284x284Logo.png | Bin 0 -> 115950 bytes src-tauri/icons/Square30x30Logo.png | Bin 0 -> 2461 bytes src-tauri/icons/Square310x310Logo.png | Bin 0 -> 135965 bytes src-tauri/icons/Square44x44Logo.png | Bin 0 -> 4630 bytes src-tauri/icons/Square71x71Logo.png | Bin 0 -> 10238 bytes src-tauri/icons/Square89x89Logo.png | Bin 0 -> 14852 bytes src-tauri/icons/StoreLogo.png | Bin 0 -> 5677 bytes .../android/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../icons/android/mipmap-hdpi/ic_launcher.png | Bin 0 -> 8239 bytes .../mipmap-hdpi/ic_launcher_foreground.png | Bin 0 -> 41472 bytes .../android/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 7819 bytes .../icons/android/mipmap-mdpi/ic_launcher.png | Bin 0 -> 4187 bytes .../mipmap-mdpi/ic_launcher_foreground.png | Bin 0 -> 20558 bytes .../android/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 3996 bytes .../android/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 13392 bytes .../mipmap-xhdpi/ic_launcher_foreground.png | Bin 0 -> 69466 bytes .../mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 12624 bytes .../android/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 26670 bytes .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin 0 -> 147460 bytes .../mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 24826 bytes .../android/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 43721 bytes .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 0 -> 256493 bytes .../mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 40511 bytes .../android/values/ic_launcher_background.xml | 4 + src-tauri/icons/icon.icns | Bin 0 -> 1894446 bytes src-tauri/icons/icon.ico | Bin 0 -> 115898 bytes src-tauri/icons/icon.png | Bin 0 -> 346080 bytes src-tauri/icons/ios/AppIcon-20x20@1x.png | Bin 0 -> 1237 bytes src-tauri/icons/ios/AppIcon-20x20@2x-1.png | Bin 0 -> 3817 bytes src-tauri/icons/ios/AppIcon-20x20@2x.png | Bin 0 -> 3817 bytes src-tauri/icons/ios/AppIcon-20x20@3x.png | Bin 0 -> 7486 bytes src-tauri/icons/ios/AppIcon-29x29@1x.png | Bin 0 -> 2289 bytes src-tauri/icons/ios/AppIcon-29x29@2x-1.png | Bin 0 -> 7067 bytes src-tauri/icons/ios/AppIcon-29x29@2x.png | Bin 0 -> 7067 bytes src-tauri/icons/ios/AppIcon-29x29@3x.png | Bin 0 -> 13940 bytes src-tauri/icons/ios/AppIcon-40x40@1x.png | Bin 0 -> 3817 bytes src-tauri/icons/ios/AppIcon-40x40@2x-1.png | Bin 0 -> 12030 bytes src-tauri/icons/ios/AppIcon-40x40@2x.png | Bin 0 -> 12030 bytes src-tauri/icons/ios/AppIcon-40x40@3x.png | Bin 0 -> 24004 bytes src-tauri/icons/ios/AppIcon-512@2x.png | Bin 0 -> 945307 bytes src-tauri/icons/ios/AppIcon-60x60@2x.png | Bin 0 -> 24004 bytes src-tauri/icons/ios/AppIcon-60x60@3x.png | Bin 0 -> 48578 bytes src-tauri/icons/ios/AppIcon-76x76@1x.png | Bin 0 -> 11036 bytes src-tauri/icons/ios/AppIcon-76x76@2x.png | Bin 0 -> 36066 bytes src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png | Bin 0 -> 42440 bytes src-tauri/src/commands/config.rs | 19 + src-tauri/src/commands/dependencies.rs | 52 + src-tauri/src/commands/diagnostics.rs | 27 + src-tauri/src/commands/download.rs | 25 + src-tauri/src/commands/history.rs | 32 + src-tauri/src/commands/kick.rs | 8 + src-tauri/src/commands/metadata.rs | 14 + src-tauri/src/commands/mod.rs | 7 + src-tauri/src/error.rs | 59 + src-tauri/src/lib.rs | 85 + src-tauri/src/main.rs | 6 + src-tauri/src/models/config.rs | 88 + src-tauri/src/models/dependencies.rs | 12 + src-tauri/src/models/download.rs | 38 + src-tauri/src/models/history.rs | 38 + src-tauri/src/models/kick.rs | 42 + src-tauri/src/models/metadata.rs | 14 + src-tauri/src/models/mod.rs | 13 + src-tauri/src/services/config_service.rs | 48 + src-tauri/src/services/dependency_service.rs | 195 + src-tauri/src/services/downloader_service.rs | 615 ++ src-tauri/src/services/history_service.rs | 68 + src-tauri/src/services/kick_service.rs | 204 + src-tauri/src/services/logger_service.rs | 175 + src-tauri/src/services/metadata_service.rs | 146 + src-tauri/src/services/mod.rs | 9 + src-tauri/src/services/paths.rs | 91 + src-tauri/src/services/system_service.rs | 87 + src-tauri/src/state/mod.rs | 20 + src-tauri/tauri.conf.json | 52 + src/App.tsx | 116 + src/components/ContextualDrawer.tsx | 207 + src/components/Titlebar.tsx | 142 + src/components/Toast.tsx | 56 + src/components/UpdateBanner.tsx | 46 + src/components/UpdateModal.tsx | 120 + src/index.css | 92 + src/lib/tauri.ts | 162 + src/lib/updater.ts | 96 + src/main.tsx | 10 + src/store/useAppStore.ts | 227 + src/tabs/BatchTab.tsx | 313 + src/tabs/HistoryTab.tsx | 164 + src/tabs/KickTab.tsx | 383 + src/tabs/PlaylistTab.tsx | 236 + src/tabs/SettingsTab.tsx | 609 ++ src/tabs/SingleTab.tsx | 494 ++ src/types/index.ts | 145 + tailwind.config.js | 54 + tests/__init__.py | 0 tests/test_downloader.py | 242 - tests/test_persistence.py | 41 - tsconfig.json | 24 + ui/__init__.py | 1 - ui/app.py | 802 -- ui/components.py | 884 --- ui/tabs/__init__.py | 1 - ui/tabs/batch_tab.py | 196 - ui/tabs/history_tab.py | 150 - ui/tabs/kick_tab.py | 677 -- ui/tabs/playlist_tab.py | 215 - ui/tabs/settings_tab.py | 412 - ui/tabs/single_tab.py | 359 - ui/theme.py | 192 - vite.config.ts | 18 + ytdlp_indirici.spec | 113 - 146 files changed, 28717 insertions(+), 6203 deletions(-) delete mode 100644 build_exe.bat delete mode 100644 core/__init__.py delete mode 100644 core/config.py delete mode 100644 core/dependencies.py delete mode 100644 core/diagnostics.py delete mode 100644 core/downloader.py delete mode 100644 core/history.py delete mode 100644 core/kick.py delete mode 100644 core/metadata.py create mode 100644 index.html delete mode 100644 installer.iss delete mode 100644 kur.bat delete mode 100644 main.py create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 public/logo.png delete mode 100644 requirements.txt create mode 100644 src-tauri/Cargo.lock create mode 100644 src-tauri/Cargo.toml create mode 100644 src-tauri/build.rs create mode 100644 src-tauri/capabilities/default.json create mode 100644 src-tauri/gen/schemas/acl-manifests.json create mode 100644 src-tauri/gen/schemas/capabilities.json create mode 100644 src-tauri/gen/schemas/desktop-schema.json create mode 100644 src-tauri/gen/schemas/windows-schema.json create mode 100644 src-tauri/icons/128x128.png create mode 100644 src-tauri/icons/128x128@2x.png create mode 100644 src-tauri/icons/32x32.png create mode 100644 src-tauri/icons/64x64.png create mode 100644 src-tauri/icons/Square107x107Logo.png create mode 100644 src-tauri/icons/Square142x142Logo.png create mode 100644 src-tauri/icons/Square150x150Logo.png create mode 100644 src-tauri/icons/Square284x284Logo.png create mode 100644 src-tauri/icons/Square30x30Logo.png create mode 100644 src-tauri/icons/Square310x310Logo.png create mode 100644 src-tauri/icons/Square44x44Logo.png create mode 100644 src-tauri/icons/Square71x71Logo.png create mode 100644 src-tauri/icons/Square89x89Logo.png create mode 100644 src-tauri/icons/StoreLogo.png create mode 100644 src-tauri/icons/android/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 src-tauri/icons/android/mipmap-hdpi/ic_launcher.png create mode 100644 src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png create mode 100644 src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png create mode 100644 src-tauri/icons/android/mipmap-mdpi/ic_launcher.png create mode 100644 src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png create mode 100644 src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png create mode 100644 src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png create mode 100644 src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png create mode 100644 src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png create mode 100644 src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png create mode 100644 src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png create mode 100644 src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png create mode 100644 src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png create mode 100644 src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 src-tauri/icons/android/values/ic_launcher_background.xml create mode 100644 src-tauri/icons/icon.icns create mode 100644 src-tauri/icons/icon.ico create mode 100644 src-tauri/icons/icon.png create mode 100644 src-tauri/icons/ios/AppIcon-20x20@1x.png create mode 100644 src-tauri/icons/ios/AppIcon-20x20@2x-1.png create mode 100644 src-tauri/icons/ios/AppIcon-20x20@2x.png create mode 100644 src-tauri/icons/ios/AppIcon-20x20@3x.png create mode 100644 src-tauri/icons/ios/AppIcon-29x29@1x.png create mode 100644 src-tauri/icons/ios/AppIcon-29x29@2x-1.png create mode 100644 src-tauri/icons/ios/AppIcon-29x29@2x.png create mode 100644 src-tauri/icons/ios/AppIcon-29x29@3x.png create mode 100644 src-tauri/icons/ios/AppIcon-40x40@1x.png create mode 100644 src-tauri/icons/ios/AppIcon-40x40@2x-1.png create mode 100644 src-tauri/icons/ios/AppIcon-40x40@2x.png create mode 100644 src-tauri/icons/ios/AppIcon-40x40@3x.png create mode 100644 src-tauri/icons/ios/AppIcon-512@2x.png create mode 100644 src-tauri/icons/ios/AppIcon-60x60@2x.png create mode 100644 src-tauri/icons/ios/AppIcon-60x60@3x.png create mode 100644 src-tauri/icons/ios/AppIcon-76x76@1x.png create mode 100644 src-tauri/icons/ios/AppIcon-76x76@2x.png create mode 100644 src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png create mode 100644 src-tauri/src/commands/config.rs create mode 100644 src-tauri/src/commands/dependencies.rs create mode 100644 src-tauri/src/commands/diagnostics.rs create mode 100644 src-tauri/src/commands/download.rs create mode 100644 src-tauri/src/commands/history.rs create mode 100644 src-tauri/src/commands/kick.rs create mode 100644 src-tauri/src/commands/metadata.rs create mode 100644 src-tauri/src/commands/mod.rs create mode 100644 src-tauri/src/error.rs create mode 100644 src-tauri/src/lib.rs create mode 100644 src-tauri/src/main.rs create mode 100644 src-tauri/src/models/config.rs create mode 100644 src-tauri/src/models/dependencies.rs create mode 100644 src-tauri/src/models/download.rs create mode 100644 src-tauri/src/models/history.rs create mode 100644 src-tauri/src/models/kick.rs create mode 100644 src-tauri/src/models/metadata.rs create mode 100644 src-tauri/src/models/mod.rs create mode 100644 src-tauri/src/services/config_service.rs create mode 100644 src-tauri/src/services/dependency_service.rs create mode 100644 src-tauri/src/services/downloader_service.rs create mode 100644 src-tauri/src/services/history_service.rs create mode 100644 src-tauri/src/services/kick_service.rs create mode 100644 src-tauri/src/services/logger_service.rs create mode 100644 src-tauri/src/services/metadata_service.rs create mode 100644 src-tauri/src/services/mod.rs create mode 100644 src-tauri/src/services/paths.rs create mode 100644 src-tauri/src/services/system_service.rs create mode 100644 src-tauri/src/state/mod.rs create mode 100644 src-tauri/tauri.conf.json create mode 100644 src/App.tsx create mode 100644 src/components/ContextualDrawer.tsx create mode 100644 src/components/Titlebar.tsx create mode 100644 src/components/Toast.tsx create mode 100644 src/components/UpdateBanner.tsx create mode 100644 src/components/UpdateModal.tsx create mode 100644 src/index.css create mode 100644 src/lib/tauri.ts create mode 100644 src/lib/updater.ts create mode 100644 src/main.tsx create mode 100644 src/store/useAppStore.ts create mode 100644 src/tabs/BatchTab.tsx create mode 100644 src/tabs/HistoryTab.tsx create mode 100644 src/tabs/KickTab.tsx create mode 100644 src/tabs/PlaylistTab.tsx create mode 100644 src/tabs/SettingsTab.tsx create mode 100644 src/tabs/SingleTab.tsx create mode 100644 src/types/index.ts create mode 100644 tailwind.config.js delete mode 100644 tests/__init__.py delete mode 100644 tests/test_downloader.py delete mode 100644 tests/test_persistence.py create mode 100644 tsconfig.json delete mode 100644 ui/__init__.py delete mode 100644 ui/app.py delete mode 100644 ui/components.py delete mode 100644 ui/tabs/__init__.py delete mode 100644 ui/tabs/batch_tab.py delete mode 100644 ui/tabs/history_tab.py delete mode 100644 ui/tabs/kick_tab.py delete mode 100644 ui/tabs/playlist_tab.py delete mode 100644 ui/tabs/settings_tab.py delete mode 100644 ui/tabs/single_tab.py delete mode 100644 ui/theme.py create mode 100644 vite.config.ts delete mode 100644 ytdlp_indirici.spec diff --git a/.gitignore b/.gitignore index 67c9480..ad3628e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,31 @@ +# Tauri & Node +node_modules/ +src-tauri/target/ + +# Security, Private Credentials & Local Server Scripts (NEVER commit) +.keys/ +*.key +*.sig +*.pem +*.pfx +*.p12 +bağlan.bat +*baglan*.bat +ba*lan.bat +*.bat.backup +publish.ps1 +publish.bat +release.ps1 +.env +.env.* +!.env.example +secrets.* +config.local.* + # PyInstaller & Build outputs build/ dist/ +dist-updates/ # Python temporary and cache files __pycache__/ @@ -9,11 +34,14 @@ __pycache__/ *.pyd # Runtime logs and cookies +*.log temp.txt cookies.txt github-recovery-codes.txt -# OS specific files +# Editor & OS specific files +.vscode/ +.idea/ .DS_Store Thumbs.db diff --git a/README.md b/README.md index be9ce15..1053c27 100644 --- a/README.md +++ b/README.md @@ -1,130 +1,86 @@ -# LDownloader v3.5.0 🎬🎵 +
-[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -[![GitHub Release](https://img.shields.io/github/v/release/LilDosto/LDownloader)](https://github.com/LilDosto/LDownloader/releases) +LDownloader Logo -**LDownloader**, Python, Tkinter ve `yt-dlp` tabanlı, koyu temalı bir Windows masaüstü video ve ses indirme uygulamasıdır. Kullanılabilir platformlar ve formatlar, kaynak içeriğe ve `yt-dlp` desteğine bağlıdır. +# LDownloader -![LDownloader Logo](assets/logo.png) +**Windows için Tauri v2 ve Rust tabanlı hızlı medya ve Kick.com indiricisi • Ultra-fast Windows media & Kick.com downloader built with Tauri v2 and Rust** + +[![License: MIT](https://img.shields.io/badge/License-MIT-10B981?style=for-the-badge)](./LICENSE) +[![Version](https://img.shields.io/badge/Version-v3.6.0-teal?style=for-the-badge)](https://git.ttmadethat.shop/LilDosto/LDownloader/releases/latest) +[![Stack](https://img.shields.io/badge/Stack-Tauri%20v2%20%7C%20Rust%20%7C%20React%2018-orange?style=for-the-badge)](https://v2.tauri.app) +[![Platform](https://img.shields.io/badge/Platform-Windows%2010%2F11%20x64-0078D6?style=for-the-badge)](https://git.ttmadethat.shop/LilDosto/LDownloader/releases/latest) + +[🇹🇷 Türkçe](#-türkçe) • [🇬🇧 English](#-english) • [📦 Releases](https://git.ttmadethat.shop/LilDosto/LDownloader/releases/latest) + +
--- -## ✨ Öne Çıkan Özellikler +## 🇹🇷 Türkçe -### 1. 🔍 Akıllı Video Önizleme & Dinamik Çözünürlük Tespiti -* Bir video bağlantısı yapıştırıldığında arka planda video başlığı, yayıncı kanal adı, video süresi ve kapak resmi (thumbnail) otomatik olarak çekilir. -* Sabit çözünürlük tahminleri yerine, videoda **gerçekte bulunan tüm çözünürlük seçenekleri** (4K, 2K, 1080p, 720p vb.) algılanıp seçim menüsüne eklenir. +**LDownloader**, Tauri v2, Rust arka ucu ve React 18 / TypeScript arayüzüyle geliştirilmiş; tekli video/ses, oynatma listesi, toplu URL indirme ve Kick.com yayın/VOD/klip indirme özelliklerini bir arada sunan hafif bir Windows medya indiricisidir. -### 2. ⚡ 1-Tıkla Otomatik FFmpeg & yt-dlp Kurucusu -* Sisteminizde `ffmpeg` veya `yt-dlp` yoksa **Ayarlar** sekmesinden bunları indirebilirsiniz. -* İndirilen araçlar uygulamanın kullanıcı veri klasöründeki `bin/` dizinine kaydedilir; Windows PATH ayarını değiştirmeniz gerekmez. İndirme için internet bağlantısı gerekir. +### Özellikler -### 3. 📦 Toplu İndirme (Batch Downloader) -* İndirmek istediğiniz birden çok video veya ses bağlantısını alt alta yapıştırın. -* Sıralı indirme kuyruğu her bir öğenin durumunu (Bekliyor / İndiriliyor / Tamamlandı / Hata) anlık olarak takip eder. +- **Çoklu İndirme Modları:** Tekli URL, Oynatma Listesi (Playlist), Toplu Liste (Batch), Kick.com kanalı/yayını, İndirme Geçmişi ve Ayarlar sekmeleri. +- **Kick Canlı Yayın, VOD & Klipler:** Yayıncı adına göre canlı yayın durumu, VOD tekrarları ve popüler klipleri tarama; canlı yayını anlık MP4 olarak kaydetme. +- **Akıllı Video Analizi & İndirme Seçenekleri:** Yapıştırılan bağlantılar için başlık, kapak, süre ve çözünürlüklerin hızlı önizlemesi; altyazı gömme, kapak/meta veri ekleme, çok parçalı indirme ve SponsorBlock segment atlama desteği. +- **Güvenlik Dayanıklılığı:** `yt-dlp` argüman enjeksiyonu koruması (`--` ayracı ve `http/https` protokol doğrulaması), indirilen çalıştırılabilir dosyaların otomatik yürütülmesini engelleyen güvenli dosya açma, izole `%APPDATA%/LDownloader/bin` bağımlılık yönetimi (`yt-dlp`, `ffmpeg`) ve bozuk JSON ayar/geçmiş dosyaları için otomatik yedekli kurtarma. +- **OTA Güncelleme & Tanılama:** Tekil uygulama örneği, sistem tepsisi, Minisign imzalı self-hosted OTA güncelleme, tek tıkla sistem tanılama raporu ve log klasörü erişimi. -### 4. 🕒 İndirme Geçmişi & Dosya Yöneticisi -* Tekil ve toplu indirme kayıtları tarih, dosya boyutu ve format bilgisiyle yerel olarak saklanır. Oynatma listesi işlemi şu anda tek bir geçmiş kaydı oluşturur. -* 📁 **Klasörde Göster**: Windows Gezgini'ni açıp doğrudan dosyayı seçili olarak görüntüler (`explorer /select`). -* ▶ **Oynat / Aç**: Varsayılan medya oynatıcınızda videoyu veya müziği anında başlatır. +### Teknoloji Yığını -### 5. 🚀 Çok Parçalı İndirme -* İsteğe bağlı çok parçalı indirme, desteklenen akışlarda indirme hızını artırabilir. Gerçek performans ağınıza ve kaynak platforma bağlıdır; belirli bir hız artışı garanti edilmez. +- **Masaüstü & Çekirdek:** Tauri v2 (`tauri 2.2`), Rust (`tokio`, `reqwest`, `zip`, `regex`, `windows-sys`), `yt-dlp` + `ffmpeg` +- **Arayüz:** React 18, TypeScript, Tailwind CSS, Zustand, Lucide Icons, Vite -### 6. 💬 Altyazı & 🖼️ Kapak Resmi Gömme -* **Altyazı Desteği**: İstenirse Türkçe ve İngilizce altyazılar indirilip, FFmpeg'in desteklediği durumlarda videoya gömülür. -* **Kapak Resmi ve Metadata**: İsteğe bağlı olarak kapak görseli ve metadata, desteklenen formatlara eklenir. +### Kurulum ve Kullanım -### 7. 🍪 Zen Browser & Modern Çerez (Cookies) Yönetimi -* **Önemli Çerez Bildirimi**: YouTube oturum çerezleri en fazla **30 dakikada bir** yenilenmelidir. Windows App-Bound güvenlik koruması sebebiyle Chromium tabanlı tarayıcılardan (Chrome, Edge, Brave vb.) doğrudan otomatik çerez çekimi kısıtlıdır; Firefox, Zen Browser veya `cookies.txt` eklentisi önerilir. -* Yaş kısıtlamalı, gizli veya YouTube 403 engeline takılan videolarda oturum çerezlerinizi tek tıkla aktarın: - * **Desteklenen tarayıcı seçenekleri**: Zen Browser, Firefox, Chrome, Microsoft Edge, Brave, Opera, Vivaldi, Chromium. - * İsteğe bağlı manuel `cookies.txt` yükleme desteği. +**Son Kullanıcı:** +1. [Releases](https://git.ttmadethat.shop/LilDosto/LDownloader/releases/latest) sayfasından `LDownloader_3.6.0_x64-setup.exe` dosyasını indirip kurun. +2. İlk açılışta **Ayarlar** sekmesinden gerekli bağımlılıkların (`yt-dlp` ve `ffmpeg`) durumunu kontrol edip tek tıkla kurabilirsiniz. -### 8. 📋 Gelişmiş Playlist İndirme -* Oynatma listelerini sıralı klasör yapısıyla (`Playlist Adı / 01 - Video.mp4`) kaydeder. -* Başlangıç ve bitiş indeks aralığı belirleyebilir, hatalı/gizli videoları atlayarak indirmeye devam edebilirsiniz. - -### 9. 🟢 Kick Canlı Yayın, VOD & Clips İndirici -* **Kanal Tarayıcısı (Keşif Modu)**: Sadece yayıncının kanal adını (örn: `elraenn`, `xqc`) yazarak kanalın canlı yayın durumunu, tüm geçmiş yayınlarını (**VOD**) ve popüler kliplerini (**Clips**) uygulama içinden listeleyebilirsiniz. -* **Canlı Yayın Kaydedici**: Devam eden canlı yayınları gerçek zamanlı olarak kaydeder, yayını baştan alma (DVR) ve çevrimdışı yayıncının yayına girmesini otomatik bekleme seçenekleri sunar. -* **VOD Kesit Alma**: Saatler süren yayın tekrarlarının tamamını indirmek yerine yalnızca istediğiniz zaman aralığını (örn: `00:10:00` - `00:25:30`) kesip indirebilirsiniz. - ---- - -## 📁 Proje Mimarisi - -``` -LDownloader/ -├── core/ # İş mantığı ve arka plan motorları -│ ├── config.py # Kalıcı kullanıcı ayarları (config.json) -│ ├── dependencies.py # yt-dlp & FFmpeg algılama, 1-tıkla indirme/kurma -│ ├── downloader.py # Asenkron indirme motoru ve süreç ağacı yönetimi -│ ├── metadata.py # Hızlı video önizleme, thumbnail ve format ayrıştırıcı -│ ├── diagnostics.py # Akıllı Türkçe hata teşhisi ve çözüm motoru -│ └── history.py # İndirme geçmişi (history.json) -├── ui/ # Arayüz bileşenleri ve modern tasarım -│ ├── theme.py # SaaS koyu mod renk paleti ve stilleri -│ ├── components.py # Modern kartlar, butonlar, giriş alanları, önizleme kartı -│ ├── tabs/ -│ │ ├── single_tab.py # Önizlemeli tekil indirme sekmesi -│ │ ├── playlist_tab.py # Oynatma listesi sekmesi -│ │ ├── batch_tab.py # Toplu indirme sekmesi -│ │ ├── history_tab.py # İndirme geçmişi sekmesi -│ │ └── settings_tab.py # Ayarlar, çerezler ve bağımlılık yöneticisi -│ └── app.py # Ana pencere ve sekme orkestrasyonu -├── assets/ # Görsel ikonlar (logo.ico, logo.png) -├── main.py # Ana uygulama başlatıcısı -├── ytdlp_indirici.spec # PyInstaller derleme yapılandırması -├── build_exe.bat # Tek tıkla Windows EXE derleme aracı -├── requirements.txt # Python bağımlılıkları -└── README.md # Dokümantasyon +**Geliştirici (Kaynaktan Derleme):** +```powershell +npm install +npm run tauri dev # Geliştirme modunda çalıştır +npm run tauri build # Üretim kurulum paketini derle ``` --- -## 🚀 Kurulum ve Çalıştırma +## 🇬🇧 English -### Gizlilik ve kullanım -* Çerezler hesabınıza erişim sağlayabilir. Yalnızca kendi hesabınızın çerezlerini kullanın; çerez dosyalarını veya uygulama tanılama kayıtlarını başkalarıyla paylaşmayın. -* İndirilen içerikleri kullanırken ilgili platformların hizmet koşullarına, içerik sahiplerinin haklarına ve yerel mevzuata uyun. Uygulama, bir içeriği indirme veya yeniden kullanma hakkı vermez. -* Harici araçlar ve medya içeriği internetten indirilir. İndirme ve kurulum işlemleri güvenilir bir ağ üzerinden yapılmalıdır. +**LDownloader** is an ultra-lightweight Windows desktop media and Kick.com downloader built with Tauri v2, Rust, and React 18 / TypeScript, supporting single downloads, playlists, batch queues, and Kick live/VOD/clip capture. -### 1. Gereksinimleri Yükleyin: -```bash -pip install -r requirements.txt -``` +### Features -### 2. Uygulamayı Başlatın: -```bash -python main.py +- **Multi-Mode Downloader:** Dedicated views for Single URL, Playlist, Batch queue, Kick.com streams, Download History, and Settings. +- **Kick Live Streams, VODs & Clips:** Browse channels by name for live status, VOD replays, and top clips, or record live streams directly to MP4. +- **Smart Metadata Preview & Options:** Instant inspection of title, thumbnail, duration, and available resolutions; supports subtitle embedding, thumbnail/metadata tagging, multi-connection downloading, and SponsorBlock skipping. +- **Security Hardening:** `yt-dlp` CLI argument-injection protection (`--` delimiter + `http/https` URL validation), safe file opening (blocks launching downloaded executables), isolated `%APPDATA%/LDownloader/bin` dependency loading (`yt-dlp`, `ffmpeg`), and self-healing config/history JSON backup recovery. +- **OTA Updates & Diagnostics:** Single-instance guard, system tray, Minisign-verified OTA updater, one-click diagnostics report, and log folder access. + +### Tech Stack + +- **Desktop & Backend:** Tauri v2 (`tauri 2.2`), Rust (`tokio`, `reqwest`, `zip`, `regex`, `windows-sys`), `yt-dlp` + `ffmpeg` +- **Frontend:** React 18, TypeScript, Tailwind CSS, Zustand, Lucide Icons, Vite + +### Installation & Usage + +**End Users:** +1. Download `LDownloader_3.6.0_x64-setup.exe` from [Releases](https://git.ttmadethat.shop/LilDosto/LDownloader/releases/latest) and run the installer. +2. On first launch, verify or install `yt-dlp` and `ffmpeg` directly from the **Settings** tab. + +**Developers (Build from Source):** +```powershell +npm install +npm run tauri dev # Run in development mode +npm run tauri build # Build Windows installer ``` --- -## 📦 İndirme ve Kurulum +## 📄 Lisans / License -LDownloader'ı iki farklı şekilde kullanabilirsiniz: - -1. **Kurulum Sihirbazı (Önerilen - `LDownloader-Setup.exe`):** - * Standart bir Windows programı gibi adım adım kurulur. - * Masaüstüne ve Başlat Menüsüne otomatik kısayol oluşturur. - * Windows Ayarları -> Yüklü Uygulamalar (Program Ekle/Kaldır) üzerinden güvenle kaldırılabilir. -2. **Taşınabilir Sürüm (Portable - `LDownloader.exe`):** - * Kurulum gerektirmeden indirip doğrudan çift tıklayarak çalıştırabilirsiniz. - ---- - -## 🛠️ Tek Tıkla EXE ve Kurulum Sihirbazı Derleme - -Uygulamayı ve kurulum sihirbazını yerel olarak derlemek için: -* `build_exe.bat` dosyasına çift tıklayın veya çalıştırın: -* Derleme sonucunda `dist/` klasöründe hem taşınabilir `LDownloader.exe` hem de `LDownloader-v3.5.0-Setup.exe` üretilecektir. - ---- - -## 📝 Lisans ve Katkı - -Bu proje [MIT Lisansı](LICENSE) altında lisanslanmıştır. Özgürce kullanabilir, değiştirebilir ve dağıtabilirsiniz. Hata bildirimleri veya yeni özellik önerileri için Pull Request gönderebilir veya Issue oluşturabilirsiniz. - -İyi indirmeler! 🚀 +Bu proje [MIT Lisansı](./LICENSE) altında lisanslanmıştır. • Licensed under the [MIT License](./LICENSE). diff --git a/build_exe.bat b/build_exe.bat deleted file mode 100644 index 648e3ac..0000000 --- a/build_exe.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off -chcp 65001 >nul -echo =================================================== -echo LDownloader v3.3.0 - Windows EXE & Kurulum Sihirbazi -echo =================================================== -echo. - -python -m PyInstaller --noconfirm ytdlp_indirici.spec -if %ERRORLEVEL% NEQ 0 ( - echo. - echo [HATA] Derleme basarisiz oldu. PyInstaller kurulu oldugundan emin olun: - echo pip install -r requirements.txt - pause - exit /b 1 -) - -echo. -if exist build rmdir /s /q build -echo [BASARILI] dist\LDownloader.exe basariyla olusturuldu! - -set "ISCC_PATH=%LOCALAPPDATA%\Programs\Inno Setup 6\ISCC.exe" -if not exist "%ISCC_PATH%" set "ISCC_PATH=C:\Program Files (x86)\Inno Setup 6\ISCC.exe" -if not exist "%ISCC_PATH%" set "ISCC_PATH=C:\Program Files\Inno Setup 6\ISCC.exe" - -if exist "%ISCC_PATH%" ( - echo. - echo Kurulum Sihirbazi (Setup.exe) derleniyor... - "%ISCC_PATH%" installer.iss - if %ERRORLEVEL% EQU 0 ( - echo [BASARILI] Kurulum dosyasi dist\LDownloader-v3.3.0-Setup.exe olusturuldu! - ) -) - -echo. -echo Islem tamamlandi! -pause diff --git a/core/__init__.py b/core/__init__.py deleted file mode 100644 index 8a41def..0000000 --- a/core/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""LDownloader Core Modules""" diff --git a/core/config.py b/core/config.py deleted file mode 100644 index 28ff331..0000000 --- a/core/config.py +++ /dev/null @@ -1,108 +0,0 @@ -import os -import sys -import json -import logging - -logger = logging.getLogger(__name__) - -def get_app_dir(): - """PyInstaller veya kaynak kod dizini.""" - if getattr(sys, 'frozen', False): - return getattr(sys, '_MEIPASS', os.path.dirname(sys.executable)) - return os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -def get_data_dir(): - """Kullanıcı verilerinin ve ayarların saklandığı dizin.""" - app_data = os.getenv('APPDATA') - if app_data: - data_dir = os.path.join(app_data, 'LDownloader') - else: - data_dir = os.path.join(os.path.expanduser('~'), '.ldownloader') - os.makedirs(data_dir, exist_ok=True) - return data_dir - -def get_bin_dir(): - """Taşınabilir yt-dlp.exe ve ffmpeg.exe ikililerinin saklandığı dizin.""" - # Öncelik 1: Uygulama çalışma dizinindeki bin/ (yazılabilirse veya içinde araç varsa) - local_bin = os.path.join(get_app_dir(), 'bin') - if os.path.isdir(local_bin) and os.access(local_bin, os.W_OK): - return local_bin - - # Öncelik 2: AppData altındaki bin/ - user_bin = os.path.join(get_data_dir(), 'bin') - os.makedirs(user_bin, exist_ok=True) - return user_bin - - -class ConfigManager: - _DEFAULT_CONFIG = { - "theme": "dark", - "download_dir": os.path.join(os.path.expanduser("~"), "Downloads"), - "video_format": "mp4", - "video_quality": "Best Quality (En İyi)", - "audio_format": "mp3", - "audio_quality": "Best Quality (En İyi)", - "cookies_mode": "none", - "cookies_browser": "chrome", - "cookies_path": "", - "embed_subtitles": False, - "subtitle_lang": "tr,en", - "embed_thumbnail": True, - "add_metadata": True, - "concurrent_fragments": 4, - "auto_fetch_metadata": True, - "speed_limit": "", - "proxy": "", - "ignore_errors": True, - "use_download_archive": False, - "sponsorblock_remove": False, - "sponsorblock_cats": "sponsor,intro,outro,selfpromo,interaction" - } - - def __init__(self): - self.config_path = os.path.join(get_data_dir(), "config.json") - self.config = dict(self._DEFAULT_CONFIG) - self.load() - - def load(self): - if os.path.exists(self.config_path): - try: - with open(self.config_path, "r", encoding="utf-8") as f: - saved = json.load(f) - if not isinstance(saved, dict): - raise ValueError("Config file must contain a JSON object.") - if "concurrent_fragments" in saved: - try: - fragments = int(saved["concurrent_fragments"]) - except (TypeError, ValueError): - fragments = self._DEFAULT_CONFIG["concurrent_fragments"] - if fragments not in (1, 2, 4, 8, 16): - fragments = self._DEFAULT_CONFIG["concurrent_fragments"] - saved["concurrent_fragments"] = fragments - self.config.update(saved) - except (OSError, json.JSONDecodeError, ValueError): - logger.exception("Could not load configuration from %s", self.config_path) - - def save(self): - temp_path = self.config_path + ".tmp" - try: - with open(temp_path, "w", encoding="utf-8") as f: - json.dump(self.config, f, indent=4, ensure_ascii=False) - f.flush() - os.replace(temp_path, self.config_path) - except OSError: - logger.exception("Could not save configuration to %s", self.config_path) - try: - os.remove(temp_path) - except OSError: - logger.debug("Could not remove temporary configuration file %s", temp_path, exc_info=True) - - def get(self, key, default=None): - return self.config.get(key, default if default is not None else self._DEFAULT_CONFIG.get(key)) - - def set(self, key, value): - self.config[key] = value - self.save() - -# Tekil örnek -config = ConfigManager() diff --git a/core/dependencies.py b/core/dependencies.py deleted file mode 100644 index 29ca0b1..0000000 --- a/core/dependencies.py +++ /dev/null @@ -1,297 +0,0 @@ -import os -import sys -import shutil -import zipfile -import subprocess -import configparser -import requests -import time -from core.config import get_bin_dir, get_app_dir, get_data_dir - -# bin/ dizinini çalışma zamanı PATH değişkeninin başına ekle -_bin_dir = get_bin_dir() -if _bin_dir and _bin_dir not in os.environ.get("PATH", ""): - os.environ["PATH"] = f"{_bin_dir}{os.pathsep}{os.environ.get('PATH', '')}" - -def get_ytdlp_cmd(): - """yt-dlp çalıştırma komutunu liste olarak döndürür (exe veya python -m yt_dlp).""" - exe = find_executable("yt-dlp") - if exe: - return [exe] - if not getattr(sys, "frozen", False): - try: - import yt_dlp # noqa: F401 - return [sys.executable, "-m", "yt_dlp"] - except ImportError: - pass - return ["yt-dlp"] - -def find_executable(name: str): - """Belirtilen çalıştırılabilir dosyayı bin/ klasöründe veya PATH'te arar.""" - exe_name = f"{name}.exe" if sys.platform == "win32" else name - - # 1. User AppData bin dizinini kontrol et - user_bin = os.path.join(get_data_dir(), "bin", exe_name) - if os.path.isfile(user_bin) and os.access(user_bin, os.X_OK): - return user_bin - - # 2. Local / Aktif bin dizinini kontrol et - bin_dir = get_bin_dir() - local_path = os.path.join(bin_dir, exe_name) - if os.path.isfile(local_path) and os.access(local_path, os.X_OK): - return local_path - - # 3. PyInstaller _MEIPASS veya app dizinindeki bin klasörü - app_bin = os.path.join(get_app_dir(), "bin", exe_name) - if os.path.isfile(app_bin): - return app_bin - - # 4. Python Scripts dizini kontrolü (örn: yt-dlp pip ile kurulmuşsa) - python_dir = os.path.dirname(sys.executable) - py_script = os.path.join(python_dir, "Scripts", exe_name) - if os.path.isfile(py_script): - return py_script - - # 5. Windows Programs Python Scripts kontrolü - if sys.platform == "win32": - local_appdata = os.getenv("LOCALAPPDATA", "") - py_programs = os.path.join(local_appdata, "Programs", "Python") - if os.path.isdir(py_programs): - for entry in os.listdir(py_programs): - candidate = os.path.join(py_programs, entry, "Scripts", exe_name) - if os.path.isfile(candidate): - return candidate - - # 6. Sistem PATH kontrolü - return shutil.which(name) - - -def get_ytdlp_status(): - """yt-dlp durumunu (kurulu_mu, versiyon, yol) döndürür.""" - exe = find_executable("yt-dlp") - if not exe: - # pip modülü veya PyInstaller gömülü modül kontrolü - try: - import yt_dlp - import yt_dlp.version - ver = getattr(yt_dlp.version, "__version__", "Gömülü") - return True, str(ver), "embedded" - except Exception: - return False, "Bulunamadı", None - - try: - flags = subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0 - out = subprocess.check_output([exe, "--version"], text=True, stderr=subprocess.STDOUT, creationflags=flags) - return True, out.strip(), exe - except Exception: - return True, "Mevcut", exe - - -def get_ffmpeg_status(): - """ffmpeg durumunu (kurulu_mu, versiyon, yol) döndürür.""" - exe = find_executable("ffmpeg") - if not exe: - return False, "Bulunamadı", None - try: - flags = subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0 - out = subprocess.check_output([exe, "-version"], text=True, stderr=subprocess.STDOUT, creationflags=flags) - first_line = out.splitlines()[0] if out else "Mevcut" - return True, first_line[:30], exe - except Exception: - return True, "Mevcut", exe - - -def get_js_status(): - """YouTube n-challenge/EJS için JS motoru durumunu döndürür.""" - for js in ("deno", "node", "qjs"): - exe = find_executable(js) - if exe: - return True, f"Hazır ({js.capitalize()})", exe - return False, "Bulunamadı", None - - -def get_ffmpeg_dir(): - """Eğer ffmpeg yerel bin dizinindeyse dizin yolunu döndürür (--ffmpeg-location için).""" - exe = find_executable("ffmpeg") - if exe: - return os.path.dirname(exe) - return None - - -def install_deno(progress_callback=None): - """YouTube EJS challenge çözümleri için resmi Deno motorunu indirir.""" - bin_dir = get_bin_dir() - os.makedirs(bin_dir, exist_ok=True) - zip_path = os.path.join(bin_dir, "deno_download.zip") - url = "https://github.com/denoland/deno/releases/download/v2.9.6/deno-x86_64-pc-windows-msvc.zip" - download_file_with_progress(url, zip_path, progress_callback) - with zipfile.ZipFile(zip_path, 'r') as zf: - zf.extract("deno.exe", bin_dir) - try: - os.remove(zip_path) - except Exception: - pass - return os.path.join(bin_dir, "deno.exe") - - -def download_file_with_progress(url: str, dest_path: str, progress_callback=None): - """URL'den dosyayı indirir ve ilerlemeyi bildirir.""" - response = requests.get(url, stream=True, timeout=30) - response.raise_for_status() - total_length = response.headers.get('content-length') - - downloaded = 0 - total = int(total_length) if total_length else None - last_callback_time = 0.0 - - with open(dest_path, "wb") as f: - for chunk in response.iter_content(chunk_size=1024 * 64): - if chunk: - f.write(chunk) - downloaded += len(chunk) - if progress_callback and total: - now = time.monotonic() - pct = (downloaded / total) * 100 - if (now - last_callback_time >= 0.08) or pct >= 100: - last_callback_time = now - progress_callback(pct, downloaded, total) - - -def install_ytdlp(progress_callback=None): - """Resmi GitHub yayınından en güncel yt-dlp.exe dosyasını indirir.""" - bin_dir = get_bin_dir() - os.makedirs(bin_dir, exist_ok=True) - target = os.path.join(bin_dir, "yt-dlp.exe") - url = "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe" - - temp_target = target + ".tmp" - download_file_with_progress(url, temp_target, progress_callback) - if os.path.exists(target): - try: - os.remove(target) - except Exception: - pass - shutil.move(temp_target, target) - return target - - -def install_ffmpeg(progress_callback=None): - """yt-dlp tarafından resmi olarak önerilen taşınabilir FFmpeg yapısını indirip ayıklar.""" - bin_dir = get_bin_dir() - os.makedirs(bin_dir, exist_ok=True) - zip_path = os.path.join(bin_dir, "ffmpeg_download.zip") - - # yt-dlp resmi FFmpeg win64 yapısı (gpl) - url = "https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip" - - download_file_with_progress(url, zip_path, progress_callback) - - # Ayıkla ve ffmpeg.exe ile ffprobe.exe'yi bin_dir içine taşı - with zipfile.ZipFile(zip_path, 'r') as zf: - for member in zf.namelist(): - filename = os.path.basename(member) - if filename in ("ffmpeg.exe", "ffprobe.exe"): - source = zf.open(member) - target_path = os.path.join(bin_dir, filename) - with open(target_path, "wb") as target_file: - shutil.copyfileobj(source, target_file) - - try: - os.remove(zip_path) - except Exception: - pass - - return os.path.join(bin_dir, "ffmpeg.exe") - - -def _find_zen_profile() -> str | None: - """Zen Browser için aktif Firefox tabanlı profil klasörünü bulur.""" - appdata = os.getenv("APPDATA", "") - zen_root = os.path.join(appdata, "Zen") - profiles_ini = os.path.join(zen_root, "profiles.ini") - if os.path.isfile(profiles_ini): - try: - cp = configparser.ConfigParser() - cp.read(profiles_ini, encoding="utf-8") - for section in cp.sections(): - if section.startswith("Install") and cp.has_option(section, "Default"): - rel = cp.get(section, "Default") - cand = os.path.normpath(os.path.join(zen_root, rel)) - if os.path.isdir(cand): - return cand - for section in cp.sections(): - if cp.has_option(section, "Path"): - p = cp.get(section, "Path") - is_rel = cp.get(section, "IsRelative", fallback="1") == "1" - cand = os.path.normpath(os.path.join(zen_root, p) if is_rel else p) - if os.path.isdir(cand) and (cp.get(section, "Default", fallback="0") == "1" or "default" in p.lower()): - return cand - except Exception: - pass - - zen_profiles = os.path.join(zen_root, "Profiles") - if os.path.isdir(zen_profiles): - folders = [os.path.join(zen_profiles, f) for f in os.listdir(zen_profiles) if os.path.isdir(os.path.join(zen_profiles, f))] - for folder in folders: - if "default-release" in os.path.basename(folder).lower() or "default" in os.path.basename(folder).lower(): - if os.path.isfile(os.path.join(folder, "cookies.sqlite")): - return folder - for folder in folders: - if os.path.isfile(os.path.join(folder, "cookies.sqlite")): - return folder - if folders: - return folders[0] - return None - - -def resolve_cookies_args(mode: str, browser: str = "firefox", cookies_file: str = ""): - """Çerez parametrelerini akıllıca çözer. Zen Browser için Firefox profilini bulur.""" - if not mode or mode in ("none", "off", "kapali", "kapalı"): - return [] - - if mode == "file": - if cookies_file and cookies_file != "Seçilmedi" and os.path.isfile(cookies_file): - return ["--cookies", cookies_file] - raise FileNotFoundError( - "Seçilen cookies.txt dosyası bulunamadı. Ayarlar bölümünden geçerli bir dosya seçin veya çerez kullanımını kapatın." - ) - - if mode == "browser": - b = (browser or "").lower().strip() - if b == "zen": - profile_path = _find_zen_profile() - if profile_path: - return ["--cookies-from-browser", f"firefox:{profile_path}"] - return ["--cookies-from-browser", "firefox"] - - return ["--cookies-from-browser", b] - - return [] - - -def test_browser_cookies(browser_name: str): - """Belirtilen tarayıcıdan çerez çekilip çekilemediğini test eder.""" - args = resolve_cookies_args("browser", browser_name) - if not args: - return False, "Geçersiz çerez parametresi" - - cmd = get_ytdlp_cmd() + args + ["--simulate", "--no-warnings", "https://www.youtube.com/watch?v=dQw4w9WgXcQ"] - flags = subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0 - try: - proc = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, creationflags=flags, timeout=15) - if proc.returncode == 0: - return True, f"✅ {browser_name.capitalize()} çerezleri başarıyla okundu!" - - err = proc.stderr.lower() - if "failed to decrypt with dpapi" in err or "dpapi" in err or "appbound" in err: - return False, ( - f"⚠️ {browser_name.capitalize()}: Windows DPAPI / App-Bound güvenlik koruması nedeniyle doğrudan çerez okunamadı. " - f"Çözüm: Firefox/Zen kullanın veya çerezleri 'cookies.txt' eklentisiyle dışa aktarıp 'cookies.txt' modunda yükleyin." - ) - if "could not copy" in err or "database" in err or "locked" in err: - return False, f"⚠️ {browser_name.capitalize()} şu an açık olduğu için Windows dosyayı kilitliyor. Tarayıcıyı kapatıp tekrar deneyin." - if "could not find" in err: - return False, f"⚠️ {browser_name.capitalize()} çerez veritabanı bulunamadı. Bu tarayıcının sisteminizde yüklü olduğundan emin olun." - return False, f"Hata: {proc.stderr.strip()[:180]}" - except Exception as ex: - return False, str(ex) diff --git a/core/diagnostics.py b/core/diagnostics.py deleted file mode 100644 index e428371..0000000 --- a/core/diagnostics.py +++ /dev/null @@ -1,90 +0,0 @@ -import re - -DIAGNOSTIC_RULES = [ - { - "keywords": ["confirm your age", "sign in to confirm your age", "age-restricted"], - "title": "🔞 Yaş Kısıtlamalı Video", - "solution": "Bu video yaş sınırına sahiptir. Ayarlar veya Çerezler bölümünden tarayıcınızı seçerek veya 'cookies.txt' dosyası ekleyerek indirmeyi yeniden deneyin." - }, - { - "keywords": ["private video", "this video is private"], - "title": "🔒 Gizli (Özel) Video", - "solution": "Bu video gizli veya yalnızca belirli kullanıcılara açıktır. İndirebilmek için videoya erişim izni olan bir hesabın çerezlerini (cookies) yüklemelisiniz." - }, - { - "keywords": ["members-only", "join this channel"], - "title": "⭐ Katıl / Üyelere Özel Video", - "solution": "Bu video yalnızca kanal üyelerine özeldir. Yalnızca bu kanala ücretli üye olan hesabınızın çerezlerini (cookies.txt) aktararak indirebilirsiniz." - }, - { - "keywords": ["n challenge solving failed", "javascript runtime", "wiki/ejs", "no supported javascript runtime"], - "title": "⚡ JavaScript EJS Motoru Gerekli", - "solution": "YouTube'un yeni güvenlik imzalarını çözmek için JavaScript motoru (Deno) gereklidir. Uygulamanız Deno motorunu bin/ klasörüne otomatik olarak entegre etmiştir." - }, - { - "keywords": ["only images are available for download", "requested format is not available"], - "title": "⚠️ Video Akışı Bulunamadı", - "solution": "Video akışı çekilemedi (yalnızca kapak görselleri mevcut). Bu video kısıtlı/üyelere özel olabilir veya yaş doğrulaması gerektirebilir." - }, - { - "keywords": ["not available in your country", "uploader has not made this video available in your country"], - "title": "🌍 Bölge Kısıtlaması (Geo-block)", - "solution": "Bu video ülkenizde kullanılamıyor. Ayarlar sekmesinden bir Proxy tanımlayabilir veya VPN kullanarak deneyebilirsiniz." - }, - { - "keywords": ["http error 403", "403: forbidden", "sign in to confirm you’re not a bot", "bot detection"], - "title": "🛡️ YouTube Bot / 403 Koruması", - "solution": "YouTube sunucuları doğrudan erişimi kısıtladı. Tarayıcınızdan taze çerezler (cookies) aktararak kimlik doğrulamasını yenileyin." - }, - { - "keywords": ["ffmpeg is not installed", "ffmpeg not found", "ffmpeg missing", "ffprobe not found"], - "title": "⚠️ FFmpeg Bulunamadı", - "solution": "Yüksek çözünürlüklü video birleştirme ve MP3 dönüşümleri için FFmpeg gereklidir. Ayarlar sekmesinden '⚡ 1-Tıkla FFmpeg Kur' butonuna tıklayarak otomatik kurabilirsiniz." - }, - { - "keywords": ["permission denied", "permissionerror", "access is denied"], - "title": "⛔ Klasör Yazma İzni Reddedildi", - "solution": "Seçilen kayıt klasörüne yazma izniniz yok. Lütfen 'İndirilenler' veya masaüstünde farklı bir klasör seçin ya da uygulamayı yönetici olarak başlatın." - }, - { - "keywords": ["no space left on device", "disk full"], - "title": "💾 Yetersiz Disk Alanı", - "solution": "Kayıt yapılan diskte yeterli boş alan bulunmuyor. Lütfen diskte yer açın veya başka bir sürücü seçin." - }, - { - "keywords": ["is not a valid url", "unsupported url"], - "title": "🔗 Geçersiz veya Desteklenmeyen URL", - "solution": "Girilen bağlantı geçerli bir video/ses bağlantısı değil. Lütfen URL'yi tarayıcınızdan kopyalayıp tekrar yapıştırın." - }, - { - "keywords": ["could not copy chrome cookie database", "could not copy", "cookie database"], - "title": "🍪 Tarayıcı Çerez Dosyası Kilitli", - "solution": "Seçilen tarayıcı açık olduğu için Windows çerez dosyasını kilitliyor. Çözüm: İndirme yaparken tarayıcıyı tamamen kapatın veya 'cookies.txt' dosya seçeneğini kullanın." - }, - { - "keywords": ["failed to decrypt with dpapi", "dpapi"], - "title": "🔐 Windows DPAPI Koruması", - "solution": "Windows güvenlik koruması (DPAPI) nedeniyle tarayıcıdan doğrudan çerez çekilemedi. Çözüm: 1) Normal videolarda çerez gerekmez, Çerezleri 'Kapalı' yapabilirsiniz. 2) Yaş kısıtlamalı videolar için tarayıcınıza 'Get cookies.txt' eklentisi kurup dışa aktardığınız dosyayı yükleyin." - }, - { - "keywords": ["unable to download video subtitles", "http error 429", "too many requests"], - "title": "⏳ Altyazı / İstek Kotası Aşıldı (HTTP 429)", - "solution": "Sunucu çok fazla altyazı veya veri isteğini geçici olarak kısıtladı. 'Altyazı göm' seçeneğini kapatarak videoyu hemen indirebilir veya Ayarlar'dan çerez (cookies.txt) ekleyerek kotayı aşabilirsiniz." - }, - { - "keywords": ["the channel is not currently live", "usernotlive"], - "title": "📡 Yayıncı Şu Anda Çevrimdışı", - "solution": "Bu Kick/Twitch kanalı şu anda canlı yayında değil. Geçmiş yayınları (VOD) veya klipleri (Clips) sekmeden seçerek indirebilir ya da 'Yayın Açılmasını Bekle' seçeneğini aktif edebilirsiniz." - } -] - -def diagnose(line: str) -> dict | None: - """Verilen log satırını analiz edip varsa tanı ve Türkçe çözüm önerisi döndürür.""" - lower_line = line.lower() - for rule in DIAGNOSTIC_RULES: - if any(kw in lower_line for kw in rule["keywords"]): - return { - "title": rule["title"], - "solution": rule["solution"] - } - return None diff --git a/core/downloader.py b/core/downloader.py deleted file mode 100644 index beaf218..0000000 --- a/core/downloader.py +++ /dev/null @@ -1,633 +0,0 @@ -import os -import sys -import re -import subprocess -import threading -from core.dependencies import find_executable, get_ffmpeg_dir, get_ytdlp_cmd -from core.diagnostics import diagnose - -class DownloadEngine: - _PROGRESS_RE = re.compile( - r"\[PROGRESS\]\s*(?P[\d.]+)(?:%\s*)?\|\s*(?P.*?)\s*\|\s*(?P.*?)\s*\|\s*(?P[^|]*)" - r"(?:\|\s*(?P
.*?)\s*\|\s*(?P.*))?" - ) - _DL_RE = re.compile( - r"\[download\]\s+(?P[\d.]+)%\s+of\s+~?(?P\S+)\s+" - r"at\s+(?P.*?)\s+ETA\s+(?P\S+)" - ) - _FFMPEG_PROGRESS_RE = re.compile( - r"size=\s*(?P\d+)\s*(?P[kKmMgG]?i?[bB])\s+" - r"time=\s*(?P