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

在 Linux 平台上支持 “点击 fuo://xxx/songs/1234 以播放歌曲“ #694

Open
2 tasks
cosven opened this issue May 19, 2023 · 0 comments
Open
2 tasks
Labels
difficulty/medium feat request feature or enhancement request os/linux

Comments

@cosven
Copy link
Member

cosven commented May 19, 2023

背景

在 Linux 平台上,可以通过以下步骤来让 FeelUOwn 处理 fuo:// 开头的链接

第一步:创建一个新的 feeluown-play.desktop,放到 applications 目录,可以参考 emacs-mail.desktop 的写法。

[Desktop Entry]
Categories=Network;Music;
Comment=GNU Emacs is an extensible, customizable text editor - and more
Exec=feeluown play %u
Icon=emacs
Name=Emacs (Mail)
MimeType=x-scheme-handler/mailto;
NoDisplay=true
Terminal=false
Type=Application

其中几个关键字段是 Exec 后面带一个 %u, MimeType, 以及 NoDisplay。

第二步:运行 xdg-mime default feeluown-play.desktop x-scheme-handler/fuo 以注册。
这样一来,就能在点击 fuo://xxx 链接的时候,触发 feeluown play fuo://xxx 命令。

需要做的事情

  • 当 FeelUOwn 服务端没有启动时,运行上述命令应该把服务端(以及 GUI)启动或者报错。
  • 打包的时候,需要添加一个 desktop 文件,并且关联这种 mimetype。
@cosven cosven added feat request feature or enhancement request os/linux difficulty/medium labels May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/medium feat request feature or enhancement request os/linux
Projects
None yet
Development

No branches or pull requests

1 participant