Fix org-mode mpv link timestamp parameter passing#26
Open
iT-Boyer wants to merge 2 commits into
Open
Conversation
- Add nil as type parameter in mpvi-org-link-push to fix parameter order - Change %S to %s in join-opts to avoid adding quotes to numeric values - This fixes the issue where videos always play from start instead of the specified timestamp Fixes lorniu#25
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.
问题
在 org-mode 中使用带时间戳的 mpv 链接时(例如
[[mpv:https://www.youtube.com/watch?v=wNH2E7iT__c#233.316667][▶ 03:53]]),预期应该从指定时间(233 秒)开始播放,但实际视频总是从头开始播放。根本原因
在
mpvi-org-link-push函数中调用mpvi-start时,参数传递顺序错误:;; 错误的调用 (mpvi-start path beg end)但
mpvi-start的函数签名是:这导致参数错位:
beg(233.316667) 被传递给了typeend(nil) 被传递给了beg,然后被设置为 0修复方案
mpvi-org-link-push中添加nil作为type参数join-opts中将%S改为%s,避免给数值类型加引号Fixes #25