keifufu / WebNowPlaying-Rainmeter

Rainmeter Adapter for WebNowPlaying
MIT License
99 stars 4 forks source link

Low Update Speed #2

Closed HerrWaffel closed 1 year ago

HerrWaffel commented 1 year ago

After trying the example skin version v2.0.0 for a few days, the measures don't seem to update with the specified update speed. From looking at the 'MeasurePosition', it updates roughly every ~4s. I tried restarting Rainmeter and unloading/loading the skin, and it didn't fix it. But it is fixed after downloading the same version and 'updating' the plugin. Any idea what might have caused this?

keifufu commented 1 year ago

With what player?

HerrWaffel commented 1 year ago

I'm using the Spotify player. Currently, I'm using your plugin for a custom player. Yesterday I had the same issue again after making a few changes to my skin. So it might be caused by refreshing too frequently?

keifufu commented 1 year ago

If it's Spotify desktop I do have an Idea. Can you tell me if it's working correctly directly after starting Rainmeter and not reloading or refreshing anything?

HerrWaffel commented 1 year ago

Directly after starting Rainmeter it works as expected. But after looking at the values in the debug window, I noticed some weird jumping in the position measure.

https://github.com/keifufu/WebNowPlaying-Redux-Rainmeter/assets/59369622/e8be187b-5a85-4a00-b398-15eb9867fbd9

This is from the example skin.

keifufu commented 1 year ago

Right, the issue with Spotify Desktop (and other desktop players) is that I can only read position from them every ~5 seconds. This means to get the position to update in seconds I update it optimistically, so that's why that "jumping" might occur.

The issue here is that this optimistic update stops working after refreshing (or whatever you do to cause it), causing the position to only update as fast as WNP gets information from Windows about Spotify.

I can fix this in the next release, however the position "jumping" will likely not be possible to fix.

HerrWaffel commented 1 year ago

That makes complete sense of what I'm seeing. I'm using the option !Redraw in one of the meters to slide it in and out of a container. So this might be the cause of the stuck optimistic update.

Thanks for the quick response and the great plugin!