Skip to content

feat(download): replace manual yt-dlp with YoutubeDLSharp package#23

Merged
ZenonEl merged 2 commits into
mainfrom
feat/youtubedlsharp
Mar 28, 2026
Merged

feat(download): replace manual yt-dlp with YoutubeDLSharp package#23
ZenonEl merged 2 commits into
mainfrom
feat/youtubedlsharp

Conversation

@ZenonEl
Copy link
Copy Markdown
Owner

@ZenonEl ZenonEl commented Mar 28, 2026

Summary

  • Add YoutubeDLSharp 1.2.0 NuGet package
  • Replace manual Process.Start("yt-dlp") with YoutubeDL.RunVideoDownload()
  • Native progress reporting with percentage, speed, ETA → updates Telegram status message
  • Proxy support via OptionSet.Proxy
  • Proper cancellation token support
  • Gallery-dl handling unchanged

Closes #4

Test plan

  • dotnet build passes (verified)
  • TikTok URL → bot downloads and sends video
  • YouTube URL → bot downloads and sends video
  • Progress updates shown in chat during download
  • Proxy setting respected for downloads
  • Gallery-dl still works for supported platforms

ZenonEl added 2 commits March 28, 2026 07:09
…auto-set

- Wrap yt-dlp download in try/finally for guaranteed temp dir cleanup
- Propagate OperationCanceledException instead of swallowing
- Remove duplicate format argument from RunVideoDownload
- Auto-set yt-dlp proxy to Tor SOCKS when torEnabled and proxy is empty
@ZenonEl ZenonEl force-pushed the feat/youtubedlsharp branch from 50fc492 to a5f3615 Compare March 28, 2026 03:09
@ZenonEl ZenonEl merged commit ba3c134 into main Mar 28, 2026
1 check passed
@ZenonEl ZenonEl deleted the feat/youtubedlsharp branch March 28, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace CLI yt-dlp with YoutubeDLSharp package

1 participant