A modern and automated repository for hosting .ogg music files used with sound.PlayURL in Garry's Mod. All files are streamed directly from GitHub Pages, ensuring fast, reliable playback in-game.
Powered by a dynamic FastAPI backend and streamlined developer tools.
Website:
🔗 https://juicymangocode.github.io/music/
Backend Upload Server:
🔗 https://mango-music-service.willard.network/
The full pipeline is powered by a custom Python FastAPI backend with Docker containerization:
- 🎥 Download Audio from YouTube using
yt-dlp - 🔄 Convert to
.oggusingffmpeg - 🧠 Intelligently Rename with sanitized and conflict-free filenames
- 📉 Compress if Necessary to meet streaming size requirements (24.5MB limit)
- 🚀 Upload to GitHub via the GitHub API (
music_assets/folder) - 🔗 Shorten URLs using the TinyURL API
- 📁 Track Metadata in
directories.jsonfor easy retrieval
All uploads are managed through asynchronous background tasks with proper authentication and error handling.
The frontend provides a clean, responsive UI:
- 🔍 Searchable Audio List
- 🎧 Preview any track directly in-browser
- 🔗 Copy Full or Shortened URL
- 📱 Mobile-Friendly Design
- 🧠 Backed by
directories.jsonmetadata index
The site is automatically updated when new tracks are uploaded.
The FastAPI backend provides comprehensive endpoints for:
- 📤 Bulk Upload from YouTube URLs with optional custom naming
- 🗑️ Delete songs from the repository
- 🔄 Replace existing songs with new versions
- ✏️ Rename songs in the metadata
- 🎫 Token Management for authentication
- 📊 Task Status monitoring for long-running operations
All operations are authenticated using Bearer tokens and run as background tasks for optimal performance.
The service runs in a containerized environment with:
- Python 3.11+ runtime
- FastAPI web framework
- FFmpeg for audio processing
- yt-dlp for YouTube downloads
- Environment-based configuration
sound.PlayURL("https://tinyurl.com/example123", "", function(station)
if (IsValid(station)) then
station:Play()
end
end)To the open-source community, contributors, and the GMod development scene for keeping Lua weird and wonderful.