mpv-discordRPC icon indicating copy to clipboard operation
mpv-discordRPC copied to clipboard

Time left continues to decrease when the mpv is paused

Open cankaratepe23 opened this issue 4 years ago • 4 comments

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

cankaratepe23 avatar May 06 '20 14:05 cankaratepe23

https://github.com/cniw/mpv-discordRPC/blob/6b49467cd644e2d72d7e2d836f052742cbca13e3/mpv_discordRPC.conf#L6-L10

@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

cniw avatar May 13 '20 07:05 cniw

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

cankaratepe23 avatar May 15 '20 03:05 cankaratepe23

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.

cniw avatar May 15 '20 06:05 cniw

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.

cankaratepe23 avatar May 17 '20 07:05 cankaratepe23