-
-
Notifications
You must be signed in to change notification settings - Fork 24
feat: add API security controls, custom audio support, and ZapScript enhancements #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ailures When custom index_root paths fail validation (due to missing directories, permissions issues, or case sensitivity mismatches), the scanner now logs debug messages explaining why paths are being skipped instead of silently continuing. This allows users to troubleshoot their index_root configuration by enabling debug logging. Fixes silent failures when users add custom game directories to index_root and wonder why their games aren't being indexed.
Enables ?system=genesis advanced arg to work with absolute and relative file paths, not just URLs. This provides a "loose" launcher hint that applies system default launchers without requiring exact launcher IDs. Behavior: - ?launcher=exact-id (highest priority) - uses specific launcher - ?system=genesis (new) - applies Genesis system defaults - Auto-detection (fallback) - platform default behavior Examples: **launch:/media/fat/_Homebrew/sonic.bin?system=genesis **launch:/mnt/usb/custom-game.md?system=megadrive This makes the API consistent: system arg now works for URLs and local paths, enabling custom game directories without needing to know exact launcher IDs.
Adds support for .zaparooignore marker files that skip scanning of directories and all subdirectories. When the media scanner encounters a directory containing .zaparooignore, it skips that entire subtree. This allows users to exclude specific folders from media indexing globally across all launchers without configuration changes.
…aylist When **playlist.open is called without arguments, it now reloads and displays the currently active playlist picker, preserving the current playback position. This matches the behavior when an argument is provided that references the already-active playlist. Returns an error if no playlist is currently active.
- Add success_sound and fail_sound config options (pointer strings) - nil = use embedded default sound - "" = disabled (no sound) - "path" = custom sound file (absolute or relative to dataDir/assets/) - Add PlayFile() function with auto-detection for WAV, MP3, OGG, FLAC - Update service callsites to use custom sounds when configured - Add format decoder dependencies (beep/v2 mp3, vorbis, flac)
Add two new security configuration options for the API server: - api_listen: Configure which network interface(s) the server binds to (defaults to ":7497" for all interfaces, can be set to "127.0.0.1:7497" for localhost-only access) - allowed_ips: IP allowlist supporting individual IPs and CIDR ranges (defaults to empty list which allows all IPs for backward compatibility) Both features are disabled by default to maintain backward compatibility. IP filtering applies to both HTTP and WebSocket connections via middleware. Includes comprehensive unit tests with coverage for IPv4, IPv6, and CIDR matching.
…nt playback - Introduced sound cancellation for overlapping playback in `PlayWAV` and `PlayFile`. - Added context management to handle and interrupt playback using `context.Context`. - Updated `playWAVWithMalgo` to support context cancellation. - Ensured thread safety with mutex locks for managing playback state.
- Strip ports from allowed IP addresses during parsing (e.g., "192.168.1.1:7497" -> "192.168.1.1"). - Switch blocked IP log messages from `Warn` to `Debug` to reduce log flooding. - Added unit tests for IPs with ports in various scenarios, including IPv6 support.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
- Added launchers for NeoGeo Pocket and Pocket Color systems. - Integrated core definitions, file extensions, and folder mappings for both systems.
- Normalize path separators in `mediascanner_test` for cross-platform compatibility. - Adjust playback generation assertions in `audio_test` to use `assert.Greater` for better flexibility.
- Introduced `_Homebrew` folder path for MiSTer configurations. - Updated `RootDirs` function to include custom folders.
- Replaced hardcoded absolute paths with `filepath.Join` for cross-platform compatibility.
…oid shared cache modification
…aunch_test` for cross-platform compatibility
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
api_listenconfig option to bind server to specific network interfacesallowed_ipsconfig option for IP allowlist filtering (supports individual IPs, CIDR ranges, IPv4/IPv6)success_soundandfail_soundconfig options supporting WAV, MP3, OGG, FLAC formats?system=<id>advanced arg for launch commands to apply system default launchers**playlist.openwith no arguments to reload currently active playlist.zaparooignorefile marker to exclude directories from media scanning