添加对外挂字幕的支持

添加对字幕的支持
This commit is contained in:
truewhile
2026-08-19 21:36:35 +08:00
parent 3edeb94c93
commit 2f1f427b9e
13 changed files with 809 additions and 5 deletions
+12
View File
@@ -50,6 +50,7 @@ type EmbyService struct {
storage cloudPlaybackResolver
probe cloudPlaybackProber
cache *RuntimeCacheService
subtitle *SubtitleService
virtualMu sync.RWMutex
virtualSeries map[string]embySeriesCacheEntry
@@ -91,6 +92,17 @@ func (e *EmbyService) SetCloudProbe(storage cloudPlaybackResolver, probe cloudPl
e.probe = probe
}
// SetSubtitleService wires the external-subtitle discovery service into the
// Emby shim so MediaStreams can advertise sideloaded subtitle tracks. It is
// nil-safe: when subtitle is nil, mediaStreams simply emits no subtitle
// streams and keeps the pre-existing Video/Audio behaviour.
func (e *EmbyService) SetSubtitleService(subtitle *SubtitleService) *EmbyService {
if e != nil {
e.subtitle = subtitle
}
return e
}
// ─── Items ───────────────────────────────────────────────────────────────────
// ItemsParams 是 /Items 与 /Users/{uid}/Items 共用的查询参数。