feat: initial implementation of uptodownbot

Telegram bot for downloading media from any site using yt-dlp.
Supports audio/video/both, quality selection, language picker,
container format selection, playlist pagination, progress updates,
per-user quotas, user preferences, download history, cancel at any step,
polling and webhook modes, proxy support, and SQLite persistence.
This commit is contained in:
2026-06-25 14:22:48 +03:30
commit 05fcdf7458
26 changed files with 3302 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package domain
import "time"
const (
RateLimitInterval = 1 * time.Second
ProgressThreshold = 5.0
MaxFileSizeEnvKey = "MAX_FILE_SIZE_MB"
DefaultMaxFileSize = 2000
DefaultDailyQuotaMB = 100
DefaultWeeklyQuotaMB = 500
DefaultMonthlyQuotaMB = 2000
CleanupInterval = 10 * time.Second
FileRetention = 1 * time.Hour
DownloadDirEnvKey = "DOWNLOAD_DIR"
DefaultDownloadDir = "/tmp/uptodown"
CookiesFileEnvKey = "COOKIES_FILE"
DBPathEnvKey = "DB_PATH"
DefaultDBPath = "data/uptodown.db"
DateLayout = "2006-01-02"
QuotaProgressThreshold = 50.0
)