Venipa / ytmdesktop2

Unofficial Youtube Music Desktop App, with LastFM support.
https://youtube-music.app
Creative Commons Zero v1.0 Universal
410 stars 30 forks source link

Change "Playing" to "Listening" on Discord Rich Presence integration #70

Open paulocavallari opened 1 year ago

paulocavallari commented 1 year ago

In the new version of Discord integration API called "Discord Game SDK" you can change a "Playing" text to "Streaming", "Listening" or some custom one.

More info here: https://discord.com/developers/docs/game-sdk/activities#data-models-activitytype-enum

Pyseph commented 7 months ago

Sadly this isn't possible due to Discord limitations, as written below in the link you sent:

ActivityType is strictly for the purpose of handling events that you receive from Discord; though the SDK/our API will not reject a payload with an ActivityType sent, it will be discarded and will not change anything in the client.

You can see that others have met the same issue here: https://github.com/discordjs/RPC/issues/146

starstriker0 commented 2 months ago

uh, i have a suggestion, and this is just a suggestion from someone who doesnt know too much about this so dont bite my head off if its a dumb one.

right now, in vencord, there is a plugin called custom rpc, witht hat oyu can set whatever status you want, listening, watching, streaming, etc. what if you used that idea and made a sort of companion plugin for vencord or better discord, would it be possible to link the "youtube music for desktop" data to that plugin and have the plugin display what you want it to?

edit: maybe have a switch in settings to control which api is used, one side of the switch uses the normal "playing" one we have now, and the other is if you have the plugin installed

Pyseph commented 1 day ago

Hello! It actually does seem to be possible, as another google chrome extension has achieved it (https://chromewebstore.google.com/detail/watchdis/fdlcfnimjmkjlajpifhnehgeeiipgmfm?hl=en-US). Perusing its source code, I found this relevant code: image So it does seem that Discord recently added support for the listening type enum, having it properly set your status as 'Listening to.' image cc. @Venipa