17 Commits

Author SHA1 Message Date
a6dc4e27b9 fix: resolve timeout issues and implement format retrieval retries
All checks were successful
Build only (for PRs) / build-only (pull_request) Successful in 3m36s
2026-03-12 20:55:42 -04:00
6b9934a221 automate management of loading emote
All checks were successful
Build only (for PRs) / build-only (pull_request) Successful in 4m52s
2026-03-09 14:25:56 -04:00
084b7ed979 optimize codebase
All checks were successful
Build only (for PRs) / build-only (pull_request) Successful in 4m43s
main.go:
- Eliminated ~160 lines of duplicate code: Extracted 3 new helper functions at the bottom of the file:
buildVideoMenuOptions([]VideoOption) — builds the Discord select menu options for video formats
buildAudioMenuOptions([]AudioOption) — same for audio
fetchAndShowFormats(s, i, url) — fetches formats, sorts them, builds menus, stores state, and edits the interaction; previously duplicated identically in both the download and download video command handlers
- Fixed time.Sleep ordering bug: The startAsyncDownload goroutine was launched before InteractionRespond with a 100ms sleep to compensate. Now the download is launched after InteractionRespond returns — no sleep needed. Removed "time" import.
- Used helpers in video_select handler: The two inline menu-building loops in that handler now call buildAudioMenuOptions / buildVideoMenuOptions

misc.go:
- Moved regexp.MustCompile(...) to a package-level var urlPattern — previously it recompiled the regex on every call to extractURLFromString
- Simplified the function body to a single return line
2026-03-09 11:10:33 -04:00
e3b5542b78 add /version command
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 5m5s
Build and Push Docker Image / deploy-on-green (push) Successful in 6s
2026-03-07 21:14:31 -05:00
aaf3338797 re-introduce context menu command 2026-03-07 21:05:23 -05:00
13bd3b82db minor UX tweaks 2026-03-05 21:42:56 -05:00
890a0dd5c9 format final video download message 2026-03-05 19:35:13 -05:00
b3d779374b have progress messages edit each other 2026-03-04 20:26:31 -05:00
a2a0aabb3a downlad into temp folder then move to out folder when done, temp replace with my fork until upstream PR is merged 2026-02-12 23:26:08 -05:00
63a6c38079 create download.go for async download function 2026-02-10 22:00:34 -05:00
4f34872f10 code cleanup 2026-02-10 21:59:30 -05:00
6ae35ec636 list formats and provide them for download 2026-02-10 21:52:39 -05:00
aa9dc58259 pass download status to discord 2026-01-26 20:16:13 -05:00
4bad5f72da interaction state management, call ytdlp through /download function 2026-01-25 20:16:58 -05:00
99c6bd379a start discord-side of things 2026-01-22 23:12:19 -05:00
9345a941fb slight dl-only PoC 2026-01-21 15:40:40 -05:00
1b9437fea9 blank slate go app 2026-01-21 14:15:59 -05:00