SeaDve / Mousai

Identify songs in seconds
GNU General Public License v3.0
1.01k stars 38 forks source link

Optionally open spotify links in desktop app #77

Open imhemish opened 1 year ago

imhemish commented 1 year ago

image

Currently when spotify button is clicked, it opens the open.spotify.com link in browser. First it gets opened in browser, and then you can open it in desktop app via website. This increases number of steps for those having official spotify desktop app. The desktop app can handle spotify:// URI links. Is there a way that spotify button provides a spotify:// URI instead of open.spotify.com. So, upon clicking Spotify in Mousai, it would directly open in spotify desktop app instead of web browser.

imhemish commented 1 year ago

The link is framed like this: image

SeaDve commented 1 year ago

That would be indeed nicer

imhemish commented 1 year ago

If the spotify app is installed, then open the spotify: uri else open the open.spotify.com link directly. If spotify app is available or not can not be checked inside a flatpak sandbox, maybe just add a preference option to open spotify links in desktop app.

SeaDve commented 1 year ago

This is harder to fix than I thought without going to the preferences route, since there is no easy or non-hacky way for a Flatpak app to get other installed apps.

gregorni commented 1 year ago

This is harder to fix than I thought without going to the preferences route, since there is no easy or non-hacky way for a Flatpak app to get other installed apps.

Junction somehow gets around it, although I'm not sure how they do it. I think one definitely needs to build the app with the --talk-name=org.freedesktop.Flatpak permission.