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

Support for Linux #26

Open
10 of 16 tasks
ungive opened this issue Jun 8, 2024 · 2 comments
Open
10 of 16 tasks

Support for Linux #26

ungive opened this issue Jun 8, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed linux This issue is relevant on Linux (only)

Comments

@ungive
Copy link
Owner

ungive commented Jun 8, 2024

Progress:

  • Use the playerctl library to detect media on the system
  • Successfully compile, run and use Music Presence to share media that is playing on the system
  • Write a Dockerfile for reproducible and reliable builds
  • Create a test release for others to test Music Presence on Linux
    Builds are available on the Discord server! https://discord.gg/musicpresence
  • Ensure Music Presence works with a system-installed Discord, as well as Discord installed via Snap or Flatpak and third-party Discord mods/flavours that use arRPC under the hood
    Implemented: ungive/discord-rpc@d32867f
  • Refactor the players.json file at https://live.musicpresence.app/v2/players.json to allow: Multiple player icon variants, a check if it's still the latest version, ... (v3). Also move the generation of it out of the internal code base to https://github.com/music-presence/media-players and rewrite it so it can easily be run on Linux (some code only runs on Windows atm) Doing this at a later time
  • Data URLs (data:image/png;base64,...) need to be parsed and uploaded using the proxy server
  • File URLs (file:///) also need to be read into memory (if not too big) and uploaded using the proxy
  • Some file URLS don't have the file:/// prefix, e.g. when playing media with fooyin: xesam:url may contain /run/user/1000/doc/2b22d58c/music.mp3. Exclude these URLs properly, maybe only allow HTTP/HTTPS for track URLs and only allow HTTP/HTTPS/file/data URLs for cover images
  • Find a fix or workaround for the playerctl memory leak mentioned below
  • Detect media players not only from their player id/name, but also with the URL to the track that is reported by MPRIS in the xesam:url field. Here the domain should be parsed and compared against well-known domains of streaming services, e.g. listen.tidal.com and open.spotify.com. This requires media to have multiple platform identifiers, not only lin_mpris, but also web_domain in this case
  • Packaging: Create standalone AppImage binary (that bundles Qt)
  • Packaging: Create deb/rpm/... packages that do (or do not) bundle Qt version 6.6.3. It most likely will have to be bundled, since Qt 6.6 is rather new and may not be present on many Linux distributions
  • Make sure playerctl does not use g_error in places where it shouldn't. It crashed for me once before with this error: could not get metadata: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.6901 was not provided by any .service filesSpeicherzugriffsfehler (Speicherabzug geschrieben)
    Related: Fix incorrect use of g_error altdesktop/playerctl#329
  • Release a version of Music Presence that ships with Linux binaries! 🎉
  • Update the player support table to include all added Linux media players
@ungive ungive converted this from a draft issue Jun 8, 2024
@ungive ungive added the enhancement New feature or request label Jun 8, 2024
@ungive ungive added this to the Music Presence 2.3.0 milestone Oct 14, 2024
@ungive ungive added the linux This issue is relevant on Linux (only) label Nov 2, 2024
@ungive
Copy link
Owner Author

ungive commented Nov 27, 2024

There's a Linux x86_64 build in the Discord: https://discord.gg/musicpresence

If you feel like helping and trying it out with your favourite media players, you're welcome to join!

@ungive ungive added the help wanted Extra attention is needed label Nov 27, 2024
@ungive ungive moved this from Paused to In Progress in Music Presence Nov 28, 2024
@ungive ungive self-assigned this Nov 28, 2024
@ungive
Copy link
Owner Author

ungive commented Nov 30, 2024

The playerctl library may not be a viable option, as it leaks a ton of memory with media players like Elisa
See altdesktop/playerctl#335

Edit: Found a workaround, see the mentioned issue

@ungive ungive removed this from the Version 2.3.0 milestone Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed linux This issue is relevant on Linux (only)
Projects
Status: In Progress
Development

No branches or pull requests

1 participant