Skip to content

Prepare StreamXBot migration from Python to Go - #3

Merged
SriKousik merged 52 commits into
mainfrom
dev/go-migration
Oct 28, 2026
Merged

SriKousik merged 52 commits into
mainfrom
dev/go-migration

Conversation

@SriKousik

@SriKousik SriKousik commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

StreamXBot to use the StreamGO

SriKousik and others added 30 commits September 18, 2026 16:35
…oding and LRU caching

- Implement ALACService for on-demand ALAC-to-FLAC transcoding using FFmpeg
- Support browser/client detection and format routing while keeping raw ALAC for native clients
- Add thread-safe per-track locking to prevent concurrent duplicate transcode jobs
- Implement background non-blocking LRU cache pruner with configurable max bytes and file limits
- Add Telegram full-track download support in telegram/client.go
- Integrate ALACService with StreamService, WarmTrack prewarming, and StreamHandler
- Add unit tests covering ALAC detection, browser routing, and LRU cache eviction
feat(stream): support ALAC browser streaming via lossless FLAC transc…
feat(stream): support ALAC browser streaming via lossless FLAC transcoding and LRU caching
# Conflicts:
#	internal/api/handlers/stream.go
feat(audio): instant on-the-fly ALAC to WAV streaming
fix: add missing closing curly brace
reachrishav and others added 22 commits September 26, 2026 17:52
…ekeeper safeguards

- Add dual-tier R2 artwork processing: 1000x1000 master and 300x300 preview WebP images
- Integrate gatekeeper safeguards in r2_storage.go: magic byte validation (DetectImageFormat) and 5MB payload limit
- Fix ID3v2.4 APIC frame extraction: handle 28-bit syncsafe sizes, prioritize APIC MIME types, and guard against false-positive JPEG markers in PNG streams
- Add album sibling cover cache deduplication to avoid redundant uploads
- Update track and album repositories with R2 cover schema fields
- Add comprehensive test suites for R2 storage, artwork extraction, and telegram thumbnails
…h false-positive guardrails

- Add internal/metadata package with CleanDuplicatedPhrase, CleanArtist, CleanTitle, and CleanMetadata
- Implement false-positive guardrails protecting legitimate repetitions (e.g. Rabindrasangeet "Sei Bhalo, Sei Bhalo" and "Tonight, Tonight")
- Integrate metadata sanitization into telegram listener ingestion, mediainfo tag extraction, and enrichment service
- Add comprehensive unit test suite covering real-world corruptions, punctuation normalization, and edge cases
…d unconditional sibling enrichment

- Fetch initial 2.5MB slice, escalating to 4.0MB only when container artwork headers indicate truncation
- Cap master artwork at 1000x1000 and preview thumbnails at 200x200 WebP
- Invert source priority to derive 200x200 preview from embedded master, skipping MTProto thumbnail download when embedded artwork is found
- Unconditionally run iTunes/Deezer enrichment regardless of R2 configuration, reusing album sibling cover URLs in-memory and from DB
…tions

Feat/artwork pipeline optimizations
feat(artwork): introduce optional Cloudflare R2 artwork storage and pipeline optimizations
feat(tracks): add DELETE /tracks/{id} endpoint with cache pruning and…
feat(tracks): add DELETE /tracks/{id} endpoint with cache pruning and orphan artwork cleanup
…ve test files

- Add modular telegram command handler package under internal/telegram/cmd/ (handler.go, help.go, user.go, sources.go, access.go, admin.go)
- Mirror exact command replies, formatting, and callback workflows from StreamXBot
- Support WebX browser session authentication via /start auth_<session_id>
- Delete all test go files across the repository
@SriKousik
SriKousik marked this pull request as ready for review October 28, 2026 07:20
@SriKousik
SriKousik merged commit 84c0c84 into main Oct 28, 2026
2 checks passed
@SriKousik
SriKousik deleted the dev/go-migration branch October 28, 2026 07:20
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.

2 participants