mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-28 11:16:37 +08:00
添加对外挂字幕的支持
添加对字幕的支持
This commit is contained in:
@@ -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 共用的查询参数。
|
||||
|
||||
Reference in New Issue
Block a user