Skip to content

Conversation

@wizzomafizzo
Copy link
Member

@wizzomafizzo wizzomafizzo commented Nov 20, 2025

  • Add api_listen config option to bind server to specific network interfaces
  • Add allowed_ips config option for IP allowlist filtering (supports individual IPs, CIDR ranges, IPv4/IPv6)
  • IP filter strips port from config entries and logs blocked requests at debug level
  • Add success_sound and fail_sound config options supporting WAV, MP3, OGG, FLAC formats
  • Implement sound cancellation: new playback interrupts previous playback via context cancellation
  • Add ?system=<id> advanced arg for launch commands to apply system default launchers
  • Allow **playlist.open with no arguments to reload currently active playlist
  • Add .zaparooignore file marker to exclude directories from media scanning
  • Added NGP and NGPC to MiSTer

…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
Copy link

codecov bot commented Nov 21, 2025

- 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.
…aunch_test` for cross-platform compatibility
@wizzomafizzo wizzomafizzo merged commit ea88b44 into main Nov 21, 2025
8 checks passed
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