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

Pause handling & new possible configuration option #40

Open
1 task done
NocFA opened this issue Sep 23, 2024 · 8 comments
Open
1 task done

Pause handling & new possible configuration option #40

NocFA opened this issue Sep 23, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@NocFA
Copy link
Sponsor

NocFA commented Sep 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

At present once a track is paused, the rich presence disappears from your profile immediately.

Solution

The first portion of this suggestion is to make this not happen, it'd be nice if the rich presence remained even when the track is paused, only dismissing it upon application closure (media player)

Secondly, this goes with the above; instead of showing the player on the small image, show a play/pause icon depending on the state regarding the above, scrobbler can remain, just, static until resume state, it seemingly already handles keeping its place upon resuming.; it'd

Alternatives

It may be worth adding the option to switch between static player icon & play/pause icons, when the player option is selected, maybe revert to old behaviour, as, some people might like the way it is now.

Additional context

No response

@NocFA NocFA added the enhancement New feature or request label Sep 23, 2024
@ungive
Copy link
Owner

ungive commented Sep 23, 2024

scrobbler can remain, just, static until resume state, it seemingly already handles keeping its place upon resuming.; it'd

What do you mean by that? Do you mean scrobbling to LastFM? Music Presence does not do any scrobbling at this time.

The first portion of this suggestion is to make this not happen, it'd be nice if the rich presence remained even when the track is paused, only dismissing it upon application closure (media player)

That's definitely possible. I could add an option "leave status active until the player is closed" (or presence is deactivated).

instead of showing the player on the small image, show a play/pause icon depending on the state regarding the above

I intend to always show the player icons for streaming services at the moment. As for offline media players, I could theoretically add the option to show playing/paused icons. I assume you're coming from the LastFM Discord integration which has that feature?

I'll put this together with another feature that was requested in the Discord, which is to allow for using "format strings" to customize the text that is shown (e.g. "{artist} - {title}"). I could allow to set the small image to a custom URL.

I'll open another issue for that.

@NocFA
Copy link
Sponsor Author

NocFA commented Sep 23, 2024

What do you mean by that? Do you mean scrobbling to LastFM? Music Presence does not do any scrobbling at this time.

Ah, apologies, the word scrobble has a different meaning to me, as, I am a LastFM user :P
By scrobbler, I meant the playback duration handler, which, Discord has finally started showing when "listening to" is being used!
So, to clarify, that specific playback duration bar, when the player is paused, can simply pause, I would think.

As for the rest, that sounds reasonable to always show the player, however, it would be nice to instead have play & pause icons as a choice, I understand that it's not up to me, appreciate the work you've done, I shall be sponsoring this project soon, just trial running it and it seems like a major successor to all the prior implements of non-agnostic playback rich presence handlers.

@ungive
Copy link
Owner

ungive commented Sep 23, 2024

By scrobbler, I meant the playback duration handler, which, Discord has finally started showing when "listening to" is being used!

Ahh, thanks for clarifying!

So, to clarify, that specific playback duration bar, when the player is paused, can simply pause, I would think.

I'm afraid that can't realistically be done as the timestamps that are used are "absolute" in time (start time is e.g. 20:13:45 o'clock, end time is 20:15:59 o'clock) which is then used by discord to determine the current progress bar offset. One would have to update the status every second for the progress bar to be "stuck in time" or fixed at a specific position. While that might work, it would probably be jumping around by a second at best + the status may only be updated 5 times per 20 seconds, which makes this infeasible. Would be awesome though if that was possible!

If I'd add the option to use format strings as in the example I gave, then one could show "Paused" on the third line e.g. if the player is paused (in place of the album).

it would be nice to instead have play & pause icons as a choice

I'll keep that in mind when I add format strings!

appreciate the work you've done, I shall be sponsoring this project soon, just trial running it and it seems like a major successor to all the prior implements of non-agnostic playback rich presence handlers.

Thank you! I really appreciate that :) My goal is to make Music Presence the de-facto replacement for all those half-baked rich presence implementations, which work but usually aren't very feature-complete or require additional steps to work.

@ungive
Copy link
Owner

ungive commented Sep 25, 2024

@NocFA Implemented the changes, please let me know your thoughts before I publish them!

The tray icon will also reflect when the status is showing paused media.

Note: This feature will only be available for offline music players for now. I always want to show the brand of the streaming service if a streaming service is playing the media, to make sure I'm crediting the source of the cover image properly whenever I can next to crediting the artist.

Playing:
image
image

Paused:
image
image

Paused (with the option to show how long it's paused, for those who want it):
image

Same in Discord light mode:
image
image

What the icon looks like in light mode with a lighter cover image:
image
image

Hovering over the icon shows the appropriate text as well:
image
image

@ungive
Copy link
Owner

ungive commented Sep 26, 2024

Modified appearance menu, also moved the setting to hide the player logo down:

image

@NocFA
Copy link
Sponsor Author

NocFA commented Sep 26, 2024

That is a beautifully clean implement indeed, strictly visually speaking, it looks perfect.

I don't assume you've added in the ability to permit pausing of streaming services while retaining RPC?

This is, to clarify without modifying the small image, just purely don't remove RPC when paused, yeet the seeker, just have static element until resumed.

Very nice work good sir.

@ungive
Copy link
Owner

ungive commented Sep 26, 2024

That is a beautifully clean implement indeed, strictly visually speaking, it looks perfect.

Thanks!

This is, to clarify without modifying the small image, just purely don't remove RPC when paused, yeet the seeker, just have static element until resumed.

My thinking was it doesn't look very nice without the paused icon but I could have enabled it for those that want it, yeah. I think I'll just do that in the next update, i.e. move "Show paused media in your status", "Show a paused icon when music is paused" and "Show for how long media is paused" out of the "Settings for offline music players" category.

I usually wait at least a week between updates, I hope that's okay :) I'll @ you here when it's out, but you'll get an in-app pop-up as well when the update is here!

You're welcome to join the Discord btw (if you haven't already), would love to have you!

@NocFA
Copy link
Sponsor Author

NocFA commented Sep 30, 2024

Perfection, and, of course understood regarding the release staggering.
Thanks for the hard work, I've joined the Discord, and I shall be shooting a sponsor your way.

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
Status: In Progress
Development

No branches or pull requests

2 participants