Skip to content
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

[Feature request] 点击B站连接直接跳转wiliwili打开 #311

Open
happytommyl opened this issue Apr 12, 2024 · 9 comments
Open

[Feature request] 点击B站连接直接跳转wiliwili打开 #311

happytommyl opened this issue Apr 12, 2024 · 9 comments

Comments

@happytommyl
Copy link

点击或浏览器打开B站连接后自动通过wiliwili打开

目前在Windows下实现的方法是:

  1. 通过浏览器插件将B站视频URL提取BV号(或直播间号)转发至自定义协议(custom protocol):wiliwili:BVXXXXXX
  2. 并在注册表接手自定义协议:
    计算机\HKEY_CLASSES_ROOT\wiliwili\shell\open\command 添加字符串值 cmd.exe /c cd /d "${directory to wiliwili.exe}" && "${directory to wiliwili.exe}\wiliwili.exe" -u "%1"
  3. 程序入口接受-u参数获取BV号进行跳转。

不清楚有没有更方便的方法

@dragonflylee
Copy link
Contributor

dragonflylee commented Apr 17, 2024

@happytommyl 注册表写入的逻辑可以集成到 wiliwili.exe 里

另外如果设置了 USE_LIBROMFS=ON 就不需要用 cmd 切换工作目录了吧

@happytommyl
Copy link
Author

@happytommyl 注册表写入的逻辑可以集成到 wiliwili.exe 里

另外如果设置了 USE_LIBROMFS=ON 就不需要用 cmd 切换工作目录了吧

改注册表的话需要提权,也需要每次运行都确认工作目录是否有改变,是否要集成改注册表的功能到主程序呢?
或者可以单独发布一个bat文件?

@dragonflylee
Copy link
Contributor

其实只需要监控剪贴板,识别B站分享URL也能实现类似的功能吧

@happytommyl
Copy link
Author

想的是点击连接直接跳转,应该只能在系统层面实现?

@dragonflylee
Copy link
Contributor

想的是点击连接直接跳转,应该只能在系统层面实现?

因为不是每个用户都会折腾油猴脚本,通过剪贴板实现 wiliwili 链接输入 门槛更低一些

@yigekuyou
Copy link

想的是点击连接直接跳转,应该只能在系统层面实现?

因为不是每个用户都会折腾油猴脚本,通过剪贴板实现 wiliwili 链接输入 门槛更低一些

剪贴板在Mac和Linux上有点难

@lhyzf
Copy link

lhyzf commented May 3, 2024

@happytommyl 注册表写入的逻辑可以集成到 wiliwili.exe 里

另外如果设置了 USE_LIBROMFS=ON 就不需要用 cmd 切换工作目录了吧

改注册表的话需要提权,也需要每次运行都确认工作目录是否有改变,是否要集成改注册表的功能到主程序呢? 或者可以单独发布一个bat文件?

注册表项可以写入 HKEY_CURRENT_USER,是不需要提权的

https://blog.walterlv.com/post/windows-uri-scheme-association.html

@yigekuyou
Copy link

首先还是得让wiliwili能打开URL,之后才能绑定

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants