WebNowPlaying icon indicating copy to clipboard operation
WebNowPlaying copied to clipboard

YouTube Music Progress Incorrectly Captured

Open haruki-taka8 opened this issue 2 years ago • 1 comments

Under unknown circumstances on YouTube Music, PlayerType=Position occasionally provides the required timestamp, but with a leading newline and four spaces.

Example:

[Measure.Position]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Position

returns the string


    1:23

and, as expected, the number 83.


This can be temporarily fixed on the Rainmeter side by appending these two lines under the measure.

RegexpSubstitute=1
Substitute="\n    ":""

Environment:

  • Windows 10 x64, build 19044
  • Rainmeter 4.5.12.3616
  • WebNowPlaying.dll 0.5.0.0
  • WebNowPlaying Companion 0.5.0
  • Brave 1.36.112 (Chromium 99.0.4844.51)

haruki-taka8 avatar Mar 16 '22 04:03 haruki-taka8

According to my hello-world-level experience in C# and OOP in general, changing the following line may fix the issue.

Old New
https://github.com/tjhrulz/WebNowPlaying/blob/905303b98ba2c7c4b46e5c1532e20c0ab8a51d1f/WebNowPlaying.cs#L231 currMusicInfo.Position = info.Trim();

haruki-taka8 avatar Mar 16 '22 12:03 haruki-taka8

Fixed in this browser extension for now, will be fixed in the official one soon too.

keifufu avatar Feb 22 '23 10:02 keifufu