WebParser doesn't support dynamic variables yet. If you do that !WriteKeyValue, I guess you'll have to refresh the skin, not only update a measure. Also, I guess this is not all of the skin. The MeasureLastArt uses a variable #lastURL# that is not defined or used anywhere else in the ini file. If you want to know why only the art is working, I guess we need to know where that variable comes from.
MerlinTheRed wrote:WebParser doesn't support dynamic variables yet. If you do that !WriteKeyValue, I guess you'll have to refresh the skin, not only update a measure. Also, I guess this is not all of the skin. The MeasureLastArt uses a variable #lastURL# that is not defined or used anywhere else in the ini file. If you want to know why only the art is working, I guess we need to know where that variable comes from.
#LastURL# is for art, all variables in #ROOTCONFIGPATH#/Variables.inc, #liURL# too
#liURL# look like: "liURL=http://www.lastfm.ru/music/Papa Roach"
lastURL="http://www.lastfm.ru/user/Rang3r"
How can skin refresh skin every 60 seconds for example, than MeasureLastInfo and MeasureLastLifeGroup will update too?
What you are trying to do is not an easy task, especially because WebParser doesn't support DynamicVariables yet. I know that some people here have managed to get around it, but I've not yet written any skin that does this, so I'll have to pass this to them.
MerlinTheRed wrote:What you are trying to do is not an easy task, especially because WebParser doesn't support DynamicVariables yet. I know that some people here have managed to get around it, but I've not yet written any skin that does this, so I'll have to pass this to them.
function Initialize()
MeasureArtist = SKIN:GetMeasure('MeasureArtist')
LastArtist = SKIN:GetVariable('LastArtist')
end
function Update()
CurrentArtist = MeasureArtist:GetStringValue()
if CurrentArtist ~= LastArtist then
SKIN:Bang('!WriteKeyValue', 'Variables', 'LastArtist', CurrentArtist)
SKIN:Bang('!Refresh')
end
end
Then use the #LastArtist# variable in the URL for [MeasureLastInfo].
function Initialize()
MeasureArtist = SKIN:GetMeasure('MeasureArtist')
LastArtist = SKIN:GetVariable('LastArtist')
end
function Update()
CurrentArtist = MeasureArtist:GetStringValue()
if CurrentArtist ~= LastArtist then
SKIN:Bang('!WriteKeyValue', 'Variables', 'LastArtist', CurrentArtist)
SKIN:Bang('!Refresh')
end
end
Then use the #LastArtist# variable in the URL for [MeasureLastInfo].