Hello everyone !
I hope you are feeling great for the end if that year
I'm trying to have an Image Meter that show an image with the url coming from a LUA script (I simplify).
My String meter display the proper url but webparser don't download the image.
I also tried by adding OnUpdateAction=[!UpdateMeasure "MeasureImage"] in [MeasureLua] but without success
SparkShredder wrote: ↑December 31st, 2018, 12:54 pm
Instead of measurename,
You can try Imagename=#CurrentPath#image.png
Doesn't help too much. MeasureName is a much better option if the image is downloaded by a WebParser measure, like in this case. First, the posted ImageName option is wrong, correctly it would be Imagename=#CurrentPath#DownloadFile\image.png, because the downloaded images are always stored into the DownloadFile folder, created in the root config.
Secondly your solution even if used correctly, requires a DynamicVariables=1 option to be added to the Image meter. Without this option the meter doesn't show the image when it's not downloaded previously and doesn't show the new image if it changes in the meanwhile.
So, basically MeasureName is better to be used then ImageName.
But let me add some complexity to the situation
I download the defautl image but when the webparser CoverMeasure value change and my Lua script change properly my url the ImageMeter isn't updated and still display the original image (the first value returned by my Lua script).
FYI I'm try to recover the thumbnail of the current playing of KODI (movie).
function Initialize()
Measures={SKIN:GetMeasure('CoverMeasure');}
end
function Update()
Var=Measures[1]:GetStringValue();
Var = Var:gsub("%%2f", "%%252f");
Var = Var:gsub("%%3a", "%%253a");
Var = Var:gsub(".jpg/", ".jpg%%2F");
Var = Var:gsub("image://", "http://localhost:8080/image/image%%3A%%2F%%2F");
if ( Var == nil or Var == '') then
Var = "https://www.lua.org/pil/capa.jpg"
end
return Var;
end
From where Image is actually loaded from? the Name of Website?
What exactly PropertiesPlayer is?
Edit: Okay , the KUDO movie's thumbnail, well, that's a quite very complex work.
Well, I see you used StringIndex=2 on the parent webparser, it should work, but for best and bugless results. Try using a new chlid with StringIndex=2
Actually I'm using a child meter.
CoverMeasure is the child and the Lua script retrieve properly the value (so coming from Kodi website). Then the Lua script re-encode the url to be accissible from 'outside'...
All parts work fine individually, I mean after Lua execution the url is correct and updated in case of changes. Only the ImageMeter always display the old image (the default one in the script, when the url is empty, aka not parsed yet).
Indeed, it's a local ressource. Kodi application host a web-server with a restful API.
Like I said it's a refresh issue; I guess I can create a lua script that generate random valid url to simplify my config and help the troubleshooting
neuroverflow wrote: ↑December 31st, 2018, 3:07 pm
Indeed, it's a local ressource. Kodi application host a web-server with a restful API.
Like I said it's a refresh issue; I guess I can create a lua script that generate random valid url to simplify my config and help the troubleshooting
Ok, please post the content of the resource, as you have it.