Skip to content

v1.9.1#249

Merged
TiTidom-RC merged 2 commits into
betafrom
dev
May 17, 2026
Merged

v1.9.1#249
TiTidom-RC merged 2 commits into
betafrom
dev

Conversation

@TiTidom-RC

Copy link
Copy Markdown
Owner

This pull request adds support for multiple audio file formats (mp3, wav, ogg, opus, flac) throughout the TTS Cast plugin, improving flexibility for users uploading and playing custom sounds. It also updates the backend and proxy logic to safely handle these new file types, and modifies the Python daemon to use a proxy endpoint for serving audio files with correct MIME types.

Audio Format Support and Validation:

  • Expanded allowed upload formats for custom sounds to include .wav, .ogg, .opus, and .flac in addition to .mp3, and updated validation and error messages accordingly in ttscast.ajax.php and the plugin configuration UI. [1] [2]
  • Updated getSoundList() and getCustomSoundList() to list all supported audio file types, not just .mp3. [1] [2]

File Handling and Security:

  • Ensured file uploads and downloads use safe filenames (via basename) to prevent directory traversal, and updated the proxy script (ttscast.audio.proxy.php) to validate file names and extensions for all supported formats and request types. [1] [2]

Proxy and Daemon Integration:

  • Modified the Python daemon (ttscastd.py) to use a new proxy endpoint (ttsWebSrvMediaProxy) for serving both standard and custom sounds, passing the filename and type as query parameters and encoding filenames safely. [1] [2] [3]
  • Dynamically set the correct MIME type for each audio file based on its extension when casting, ensuring compatibility with various devices.

Miscellaneous:

  • Bumped plugin version to 1.9.1 in info.json.
  • Minor import fix in ttscastd.py for quote from urllib.parse.

Add support for additional audio formats (.wav, .ogg, .opus, .flac) across uploads and media listings; sanitize uploaded filenames. Introduce a unified audio proxy (ttscast.audio.proxy.php) with distinct handling for tts (cache) and sounds/customsounds (media folder) and stricter filename validation. Update daemon to use the proxy URL, quote filenames, detect mime type by extension and set media_type accordingly. Update UI accept/tooltip, bump pluginVersion to 1.9.1, and rename config key to ttsWebSrvMediaProxy.
@TiTidom-RC TiTidom-RC merged commit b0f0ca7 into beta May 17, 2026
1 check 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.

1 participant