feat(playback): client direct-play decode mode (release host transcoding)

Add an admin toggle playback.direct_only that offloads all decoding to the
client. When enabled:
- Emby PlaybackInfo no longer advertises SupportsTranscoding nor a
  TranscodingUrl, forcing Emby/Infuse/Yamby clients to direct play.
- HLS endpoints refuse (ErrTranscodeDisabled) so the host never spawns ffmpeg.
- Web player forces direct play, hides the HLS toggle, and surfaces a hint.
Exposed via /system/info (direct_play_only) and the Settings page.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
soldosluka857
2026-05-30 11:08:59 +00:00
committed by Shuke
parent 48aa08fc94
commit e50282178d
8 changed files with 166 additions and 36 deletions
+6
View File
@@ -75,6 +75,12 @@ func ApplyRuntimeSetting(cfg *config.Config, key, value string) {
}
}
// ParseBoolSetting is the exported variant of parseBoolSetting for handlers
// that need to interpret persisted on/off settings (accepts zh + en tokens).
func ParseBoolSetting(value string, fallback bool) bool {
return parseBoolSetting(value, fallback)
}
func parseBoolSetting(value string, fallback bool) bool {
switch strings.ToLower(strings.TrimSpace(value)) {
case "1", "true", "yes", "on", "enabled", "启用", "开启":