It is currently March 28th, 2024, 1:15 pm

[Bug] Nowplaying Plugin, high CPU usage

Report bugs with the Rainmeter application and suggest features.
Post Reply
chiwou
Posts: 7
Joined: July 15th, 2010, 8:32 pm

[Bug] Nowplaying Plugin, high CPU usage

Post by chiwou »

found a small issue with the nowplaying plugin

I made a config with a dynamic background, and used the TrackChangeAction=!RainmeterRefresh #CURRENTCONFIG# option to update the config
here is the skin

Code: Select all

[Rainmeter]
Author=chiwou
AppVersion=2001000
Update=1000

[Metadata]
Name=Player
Config=AREEVA | Player
Description=Player control
Version=1.0.0
Tags=AREEVA | Player
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
@Include1=#SKINSPATH#AREEVA\Global\Variables.inc
@Include2=#SKINSPATH#AREEVA\Global\Styles.inc

[mPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=foobar2000
; The MAIN MEASURE specifies the media player name here.
PlayerType=TITLE
TrackChangeAction=!RainmeterRefresh #CURRENTCONFIG#

[mArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[mPlayer]
; SECONDARY MEASURES specify the name of the main measure here.
; The main measure name must be enclosed in square brackets.
PlayerType=ARTIST

[TrackBackground]
Meter=IMAGE
ImageName=#CURRENTPATH#Background.png
X=0
Y=0
W=#CURRENTCONFIGWIDTH#
H=#CURRENTCONFIGHEIGHT#
DynamicVariables=1

[Track]
Meter=STRING
MeasureName=mPlayer
MeasureName2=mArtist
X=4r
Y=4r
;FontFace=Trebuchet MS
FontColor=FFFFFFFF
AntiAlias=1
;ClipString=1
Text="%1- %2"
AutoScale=0

;EOF
Now when I play a track the CPU usage is extremely high and rainmeter won't accept any commands and most other applications wont work, too
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm
Contact:

Re: [Bug] Nowplaying Plugin, high CPU usage

Post by poiru »

This is not a bug, but a misuse of the feature. When you refresh the entire skin, NowPlaying 'restarts' as well. This leads to an infinite loop and causes high CPU usage.

You could use the following:

Code: Select all

TrackChangeAction=!RainmeterUpdate "#CURRENTCONFIG#"
However, I don't see why this is required. TrackChangeAction should be used only if you want to do something fancy on track change. The information will be updated in <1000ms (1 second) normally.
chiwou
Posts: 7
Joined: July 15th, 2010, 8:32 pm

Re: [Bug] Nowplaying Plugin, high CPU usage

Post by chiwou »

okay my bad, but your solution doesn't work with the dynamic width
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm
Contact:

Re: [Bug] Nowplaying Plugin, high CPU usage

Post by poiru »

chiwou wrote:okay my bad, but your solution doesn't work with the dynamic width
Try adding DynamicWindowSize=1 under the [Rainmeter] section.
chiwou
Posts: 7
Joined: July 15th, 2010, 8:32 pm

Re: [Bug] Nowplaying Plugin, high CPU usage

Post by chiwou »

thanks that works, but only to make it bigger if a title is smaller the background won't shrink

thanks again for your help, much appreciated
SparkShredder
Posts: 50
Joined: November 17th, 2017, 12:00 pm

Re: [Bug] Nowplaying Plugin, high CPU usage

Post by SparkShredder »

Smaller ?Smaller than what.
Post Reply