-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add danmaku support for bilibli video playback #58
Conversation
719193f
to
9f094d4
Compare
大佬觉得这个fallback有必要添加吗?或者我可以先pr,后面再优化和添加fallback。 |
我在调试 fallback,本地似乎出了点问题 |
OK |
235f17d
to
394f7c4
Compare
应该可以了 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
end | ||
|
||
if cid == nil then | ||
cid = mp.get_opt('cid') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里我觉得还可以再加一个fallback,参考下面这个实现。不过这个实现的正则我觉得写的有点不太好,我个人觉得用这个正则匹配更好一点bilivideo%.c[nom]+.*/(%d+)-%d+-%d+%.%.*%?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
个人觉得可以加一段下面这样的,作为mp.get_opt('cid')拿不到时候的fallback
local pat = "bilivideo%.c[nom]+.*/(%d+)-%d+-%d+%.%.*%?"
local path = mp.get_property("path")
if path:find(pat) then
cid = path:match(pat)
end
end
feat: add danmaku support for bilibli video playback
feat: add danmaku support for bilibli video playback
另见 #57