修复倍速记忆无法保持正常倍速的问题#8
Open
ShowMak3r19 wants to merge 1 commit into
Open
Conversation
Emby can temporarily reset video playbackRate to 1x during playback lifecycle changes. The previous protection loop forced the old saved speed back onto the player, which made an explicit return to normal speed difficult to keep. This change saves explicit speed-menu selections, treats 1x as a valid stored value, and restores the previous non-normal speed only when 1x appears as an automatic reset. Constraint: Must preserve cross-episode playback speed inheritance while allowing users to intentionally store 1x Rejected: Keep the 1x protection interval | it overrides intentional normal-speed selections Confidence: high Scope-risk: narrow Directive: Do not treat every 1x ratechange as a user choice; Emby emits automatic 1x resets during playback lifecycle events Tested: node --check RememberPlaybackSpeed.js Tested: Node fake video/localStorage harness for initial restore, automatic 1x reset recovery, and explicit 1x menu selection Not-tested: Live Emby Web or Emby Theater manual session
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.
概要
修复
RememberPlaybackSpeed.js在用户想改回正常倍速时,会被旧的已保存倍速重新覆盖的问题,同时保留原本“下一集/重新播放继承倍速”的功能。修改内容
1x作为有效的已保存倍速处理,用户可以真正把记忆倍速改回正常倍速。1x后被无条件改回旧倍速。1x、1.5x、正常、原速、Normal等常见文本。playbackRate临时重置为1x,并且此前保存的是非正常倍速时,脚本会短暂延迟后恢复旧倍速。1x,则保存1x,后续暂停、快进、退出重新播放不会再被旧倍速覆盖。localStorage存储方式不变。验证
node --check RememberPlaybackSpeed.js,语法检查通过。video + localStorage场景验证:1.5x时,初始化会恢复到1.5x。1x时,会恢复回1.5x。1x倍速菜单时,会保存正常倍速。未测试