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

"Listening to" Discord RPC #488

Merged
merged 8 commits into from
Oct 27, 2024
Merged

Conversation

3top1a
Copy link
Contributor

@3top1a 3top1a commented Oct 17, 2024

Implements "Listening to" Discord PRC in issue #487.

Some implementation notes:

  • It's absolutely hacked together, as I do not know how the code base works
  • It has a git dependency for a fork of the discord-rpc with the activity field added in
  • Many of the discord settings are now unnecessary (Unless you want to prefix the name's song with "Headbanging to ..."
  • Because the updateActivity function is called every second, the time may jitter around (see gif below; discord updates the played time automatically so it only needs to be set and cleared)

anim

Screenshot_20241017_201719
image

@3top1a
Copy link
Contributor Author

3top1a commented Oct 17, 2024

Now that I'm looking at it, #454 has done almost the same thing

@Mar0xy
Copy link
Contributor

Mar0xy commented Oct 19, 2024

Now that I'm looking at it, #454 has done almost the same thing

I would say this supersedes #454 due to the fact that this also adds the time bar

src/scripts/discord.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@3top1a
Copy link
Contributor Author

3top1a commented Oct 22, 2024

I will do some more enhancements, however it is in a functioning state now

@3top1a
Copy link
Contributor Author

3top1a commented Oct 22, 2024

Because of how this works now, I've removed all redundant settings except the details prefix (includeTimestamps is now on by default because it has a sane implementation, buttons do not work and I don't believe Tidal should be announcing itself when nothing is playing, so now it's just like Spotify).
image
This makes the code much simpler, but leaves the end result untouched. I've also added a system to retry connecting to discord if it fails.
image

@Mastermindzh
Copy link
Owner

The arbitrary removal of features other users have requested & use just to make it more like Spotify is a weird move.

Please revert the unnecessary settings changes, the extra options are nice to have for users that prefer them.

Thanks.

@Mar0xy
Copy link
Contributor

Mar0xy commented Oct 22, 2024

Buttons do actually still work just they no longer show up for your own user (you have to view it from another user)

@3top1a
Copy link
Contributor Author

3top1a commented Oct 23, 2024

Buttons do actually still work just they no longer show up for your own user (you have to view it from another user)

Oh, I didn't realize that, thanks.

The arbitrary removal of features other users have requested & use just to make it more like Spotify is a weird move.

Please revert the unnecessary settings changes, the extra options are nice to have for users that prefer them.

Thanks.

Understandable, showing 'Browsing Tidal' or turning off timestamps didn't seem useful to me so I removed them.

Copy link

sonarcloud bot commented Oct 23, 2024

@Mastermindzh Mastermindzh changed the base branch from master to develop October 27, 2024 19:17
@Mastermindzh Mastermindzh merged commit d1e0321 into Mastermindzh:develop Oct 27, 2024
5 checks passed
@aljustiet
Copy link

1.mp4

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

Successfully merging this pull request may close these issues.

4 participants