mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-29 19:36:36 +08:00
e50282178d
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>
40 lines
952 B
TypeScript
40 lines
952 B
TypeScript
import { api } from './client'
|
|
|
|
// systemAPI wraps the read-only /system/* metadata endpoints used by the
|
|
// React shell (footer, admin dashboard, scheduler page).
|
|
export const systemAPI = {
|
|
info: () =>
|
|
api
|
|
.get<{
|
|
name: string
|
|
version: string
|
|
go: string
|
|
os: string
|
|
arch: string
|
|
data_dir: string
|
|
cache_dir: string
|
|
direct_play_only?: boolean
|
|
}>('/system/info')
|
|
.then((r) => r.data),
|
|
|
|
status: () =>
|
|
api
|
|
.get<{
|
|
uptime_seconds: number
|
|
goroutines: number
|
|
cpu_percent?: number
|
|
memory_used?: number
|
|
memory_total?: number
|
|
disk_used?: number
|
|
disk_total?: number
|
|
}>('/system/status')
|
|
.then((r) => r.data),
|
|
|
|
scheduler: () =>
|
|
api
|
|
.get<{ jobs: { name: string; cron: string; next_run?: string; last_run?: string }[] }>(
|
|
'/system/scheduler',
|
|
)
|
|
.then((r) => r.data),
|
|
}
|