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

Time left continues to decrease when the mpv is paused #9

Open
cankaratepe23 opened this issue May 6, 2020 · 4 comments
Open

Time left continues to decrease when the mpv is paused #9

cankaratepe23 opened this issue May 6, 2020 · 4 comments

Comments

@cankaratepe23
Copy link

On Windows 10,
mpv version 0.32.0-288-gee70e8ce50
and mpv-discordRPC version 1.4.1-UNKNOWN
I did not change any settings after installation.

When mpv is paused, Discord presence updates properly to show that the player is paused, but the remaining time continues ticking down, for around 15 seconds, after which, it jumps back to the proper time and continues ticking down.

e.g.:

  • I paused a movie with mpv showing 04:22:47 left;
  • Discord presence shows the paused icon but the "xx:xx:xx left" text continues ticking down
  • Once the timer reaches "04:22:31 left", after one second, it jumps back to "04:22:45 left" and continues this countdown loop.

Everything else works fine i.e. the current timestamp ("AV:") does not change while the time left counter is ticking down.

Here's a screen recording from the Discord desktop app to better illustrate my issue (username and tag blurred for privacy):

mpv-discordRPC

@cniw
Copy link
Owner

cniw commented May 13, 2020

periodic_timer=15
# Recommendation value, to set `periodic_timer`:
# value >= 1 second, if use lua-discordRPC,
# value >= 3 second, if use pypresence (for the python3::asyncio process),
# value <= 15 second, because discord-rpc updates every 15 seconds.

@Mmedic23 sorry, slow response.

You can change the value to periodic_timer=1, the mpv_discordRPC.conf file is in the script-opts folder.

Should be understood that this only affects your local rpc on discord native client because the discord server limits it in 15 seconds each updates, so if you look at it from another device it will be the same.

hopefully this can solve your problem

@cankaratepe23
Copy link
Author

Is it not possible to pause the timer while the player is paused as well? Does it have to count down continuously?

@cniw
Copy link
Owner

cniw commented May 15, 2020

it's possible, you just need to edit your configuration file as i said above but it has limitations caused by discord server it self.
@Mmedic23 btw, have you tried it?

there 2 options can be used to display time stamps: elapsed or remaining modes, even that can be hidden but i need to edit the main script.

@cankaratepe23
Copy link
Author

Yes I have tried it, and it works as I expected: the "time left" counter ticks down 1 second and immediately jumps back, continuously.

What I'm curious about is why it counts down even when it knows the player is paused. For example, can the script not hold the last value for "time left" when the player is paused and show that while it's paused?

I don't have much experience with lua, mpv or discord-rpc so please excuse me if it's a limitation on one of those.

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