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

Use Listening activity type instead of Playing type #29

Closed
1 task done
n1ckoates opened this issue Jul 26, 2024 · 10 comments
Closed
1 task done

Use Listening activity type instead of Playing type #29

n1ckoates opened this issue Jul 26, 2024 · 10 comments
Labels
enhancement New feature or request

Comments

@n1ckoates
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

Currently, Music Presence uses the "Playing" status (activity type 0), which is not the ideal way to show that you're listening to music. Spotify's Discord integration, for example, says "Listening to Spotify" instead.

Solution

Music Presence should switch to the "Listening" status (activity type 2).

Alternatives

There are other supported activity types ("Playing", "Watching", and "Competing in") that are available, but they don't make sense for music. Still, users might want to keep "Playing," so it could be worth adding an option to customize this.

Additional context

Discord just added support for this, which wasn't previously possible.

@n1ckoates n1ckoates added the enhancement New feature or request label Jul 26, 2024
@ungive
Copy link
Owner

ungive commented Jul 26, 2024

Thanks for opening this issue.

I have tried this with the Discord Game SDK, version 3.2.1 (the newest version) and it doesn't seem to work for me. What I used to test this is an old release of Music Presence (v1.4.1) which uses the mentioned Game SDK version and sets the activity type to DiscordActivityType_Listening (source code). I've also tried it with a release of purpl3F0x's rich presence, which uses Game SDK version 2 I believe and sets the type to listening as well and it doesn't work either.

The old deprecated discord-rpc doesn't seem to support setting the activity type. At least I can't find anything in the docs that suggest an activity type.

Are you sure this information on X is accurate? Have you witnessed or do you know of another RPC application (that doesn't use the Discord gateway) which shows "Listening to" instead of "Playing" now?

@n1ckoates
Copy link
Author

Yes, I'm certain the information is accurate - it's from a Discord employee. I was able to set the status to Listening with a TIDAL client mod: Inrixia/neptune-plugins#37

Most libraries don't support it yet, because changing the activity type was previously unsupported.

@ungive
Copy link
Owner

ungive commented Jul 27, 2024

Thanks for the pointers.

I digged into discord-rpc a bit more and implementing the change was trivial:

grafik

It seems though that timestamps are not shown. I'll see what I can do about that.

I'll try make a release for this this weekend.

@ungive
Copy link
Owner

ungive commented Jul 27, 2024

Seems it's not possible to get the timestamps with the listening type, if the docs can be taken literally (emphasis mine):

timestamps? Unix timestamps for start and/or end of the game

https://discord.com/developers/docs/topics/gateway-events#activity-object

A bit unfortunate in my opinion. I don't use X, but maybe you can reach out to the intern who implemented the change and bring to his attention that timestamps would make sense on the listening activity type too, in case you're of that opinion as well.

@n1ckoates
Copy link
Author

Already reached out with that feedback, they said they'll probably change it.

@ungive
Copy link
Owner

ungive commented Jul 27, 2024

Would be awesome if it looked the same as the Spotify status, with an actual progress bar. :)

@ungive
Copy link
Owner

ungive commented Jul 28, 2024

Implemented as part of the v2.1.3 release.

@ungive ungive closed this as completed Jul 28, 2024
@degu-Tanya
Copy link

degu-Tanya commented Aug 23, 2024

Would be awesome if it looked the same as the Spotify status, with an actual progress bar. :)

I saw this on vencord, but I guess its only for macOS with the apple music app. (or else I bet they would have done it for windows + apple music app)
I would really love for this to be possible for all music apps and systems one day (discord please allow it!)
https://github.com/Vendicated/Vencord/tree/main/src/plugins/appleMusic.desktop
https://vencord.dev/plugins/AppleMusicRichPresence
335073274-1f811090-ab5f-4060-a9ee-d0ac44a1d3c0

@ungive
Copy link
Owner

ungive commented Aug 23, 2024

@degu-Tanya Do you know if it looks like this to non-Vencord users as well? I've never seen a progress bar like this for anything but Spotify. It might be a visual enhancement added by Vencord itself.

Feel free to join the Discord server, would love to see it!

@degu-Tanya
Copy link

I sadly do not have macOS, I asked in the vencord discord server and and a user with coding role said everyone can see it. but I tried to see if anyone on the server list used it but I failed to see anyone with the plugin and apple music playing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants