Repository navigation
fix: align MediaInfo projection with Plex metadata - #11
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plex 的单项 metadata、季度集合和播放 decision 对 Stream 的原生响应形态不同。此前统一投影 Stream 会让集合响应偏离 Plex 原始契约,进而影响部分原生客户端加载季度。
本 PR 将 MediaInfo 投影收敛为端点语义:单项 metadata 和 decision 可补充缺失的 Media、Part 与描述性 Stream,季度集合仅补充 Media 与 Part,不读取、创建或修改 Stream。生成的 Stream 不伪造 Plex 拥有的 ID、选择状态或播放 decision;Plex 已有字段、未知字段和对象身份保持不变。
同时对齐 Plex 的 profile、宽高比、帧率、HDR10、HLG、Dolby Vision、音频和字幕字段表达。Plex 原始 metadata 已完整时,响应保持原样,不触发 STRM 读取、缓存查询或远程探测,为后续持久 MediaInfo 写入保留透明透传路径。
验证
go test -race -count=1 ./...本 PR 不增加客户端特判矩阵,不写入 Plex 数据库,也不改变本地媒体或现有 302 数据路径。