tiliado / nuvolaplayer

Nuvola Player - Tight integration of web-based media streaming services with your desktop
https://nuvola.tiliado.eu/
BSD 2-Clause "Simplified" License
334 stars 27 forks source link

Expose the device name/hostname to `integrate.js` #684

Closed strugee closed 3 years ago

strugee commented 3 years ago

Is your feature request related to a problem? Please describe:

As I mentioned in #683, I need to register device information with the service I'm integrating into Nuvola. I'd like to get the device hostname to use as the "device name" in the service. Although a human-readable name (e.g. AJ's laptop vs ajs-laptop) would be better - I'm not sure if GNOME/other DEs distinguish between these?

Describe the solution you'd like:

The hostname or human-readable name (or both) should be exposed to integrate.js somewhere on the Nuvola object (or something like that).

Describe alternatives you've considered:

None, yet. The integration API for this service is kind of an all-or-nothing kind of deal, so I have to provide this information. I could hardcode it to something like "Linux device" or something like that but that seems... very unideal.

Additional context:

https://github.com/strugee/nuvola-app-jellyfin, https://jellyfin.org/

jiri-janousek commented 3 years ago

Hello @strugee, getting a hostname is easy but getting a pretty device name is tricky from the flatpak sandbox. I'll add only Nuvola.HOSTNAME for now.

strugee commented 3 years ago

Makes sense, thank you! Will this show up in ADK builds soon automatically or do I need to wait for you to cut a release?

jiri-janousek commented 3 years ago

📌 The feature landed in the master branch of Nuvola Player and is already available in the master branch of 📦 Nuvola ADK flatpak package. flatpak run --command=nuvolaruntime eu.tiliado.NuvolaAdk//master -V should show Version 4.20.0-dev4 or later. It will be included in the next stable release Nuvola 4.20 scheduled for 🚀2020-12-27.