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

My media player is not detected #151

Open
smiba opened this issue Jan 26, 2025 · 8 comments
Open

My media player is not detected #151

smiba opened this issue Jan 26, 2025 · 8 comments

Comments

@smiba
Copy link

smiba commented Jan 26, 2025

Players I am using, that aren't supported yet:

version: 2.2.8
mac_mediaremote: com.apple.WebKit.GPU - Safari Graphics and Media (disabled)
mac_mediaremote: com.microsoft.teams2.helper - Microsoft Teams WebView (disabled)
mac_mediaremote: org.videolan.vlc - VLC (disabled)
mac_mediaremote: tv.plex.desktop - Plex (disabled)
signature: f48429f94ffcbbd

This is about Plex (tv.plex.desktop) on MacOS (I don't care about the others for presence), I would love to see it supported. A similar app also exists on Windows and I presume Linux.

I would love to try writing A PR for this, but it seems the project isn't open source

@ungive
Copy link
Owner

ungive commented Jan 26, 2025

You're correct, the program's source code is closed, but some parts are open-source, see here:

All supported media players are maintained here: https://github.com/music-presence/media-players

If you like you can contribute by looking at what I did in previous commits and checking out the repository! Here's an example for a new player: music-presence/media-players@f71fb8a. I haven't documented much at the moment, but it's all file-based and you can look at the available build tasks in tasks.py.

In your case tv.plex.desktop is a mac_mediaremote identifier for Plex. I suggest you use the identifier plex for adding a new player and add it under src/players/multimedia-players.

You could also add org.videolan.vlc to mac_mediaremote for VLC, if you like (in a separate PR of course)

Build example:

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
inv build

After building there should be icons in out/public/icons/plex (given you used the ID "plex") and out/public/players.json should contain an entry for Plex, similar to other players.

Feel free to make a PR, if you need any help or more documentation lmk!

@ungive
Copy link
Owner

ungive commented Jan 26, 2025

Also check the schemas, e.g. https://github.com/music-presence/media-players/blob/master/src/schemas/player.schema.json. Every field of every yaml is documented in them, see the yaml-language-server comment at the top which works in tandem with VS Code's YAML extension (by Red Hat) and which also helps with validation while you write the file.

@smiba
Copy link
Author

smiba commented Jan 26, 2025

Thank you! Working on it, expect a PR soon :)

EDIT: Could you tell me a bit more about discord_application_id? What is its purpose and how do I find out the correct one?

@ungive
Copy link
Owner

ungive commented Jan 26, 2025

Could you tell me a bit more about discord_application_id? What is its purpose and how do I find out the correct one?

I create them in the Discord Developers dashboard (https://discord.com/developers/applications), here's one for Plex: 1333150710237233205

@smiba
Copy link
Author

smiba commented Jan 26, 2025

Thank you!

@smiba
Copy link
Author

smiba commented Jan 26, 2025

Created PRs:

Also have a branch with an update to the media player support list, but I first need to test what actually works and what not before I will create a PR for it :)
(https://github.com/smiba/discord-music-presence/tree/update-mediaplayer-list-plex)

@ungive
Copy link
Owner

ungive commented Jan 26, 2025

Thanks! I will look at them in a bit!

About the support list, I was meaning to generate it based on the repository, one could write a script or Invoke task (in tasks.py or a separate file) that generates the Markdown table for supported players. Maybe that's something you want to look into too, if you have the time? Right now it's quite manual work that is error-prone.

@smiba
Copy link
Author

smiba commented Jan 26, 2025

The overview should be easy, but I'm not entirely certain what the best way would be for the entire table.
Might be possible if we describe the level of support for a player in the player files?

✅ and "..." are simple and we already have all the information we need to generate those, but I don't believe ✖️ (and the other more specific states) are currently written down in any machine readable files.

Basically:

  1. Do you think it might be a good idea to store player support in the player yaml files?
  2. How would we deal with comments about certain players like how to configure them etc. (also include them in the yaml files?)

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

2 participants