SlowCircuit wrote: ↑April 10th, 2021, 9:40 pm
And it STILL only downloads the tmb version. If I remove the Download lines, and I check the log I do see that Item1Image's URL is set to the 800a one, but with the download lines, it just downloads the tmb version. If I turn on debug mode and look at the log when it downloads, it says it's downloading the tmb version.
Not sure what is causing this, but there is a small mistake in your code. The [Item1Image] measure should return the URL of the high resolution image (due to its
StringIndex=3 option and the substitution), but should also download the image (due to the
Download=1 option). A WebParser measure which downloads an image has to return the path of the downloaded image. And this is a contradiction: the measure can't return both, a URL and a path of an image. That's why you have to create two distinct WebParser measures: first to get the URL of image and second to download the appropriate image.
Weird is that simply rewriting the code doesn't help: I got nothing downloaded. So I had to add a trick. See the code below:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[Variables]
Substitutes="/tmb/":"/800a/","<i>":"","</i>":"","<em>":"","</em>":""
RSSLink=http://www.rssmix.com/u/12905273/rss.xml
RegexPattern=.*<item>.*<title>(.*)<.*<link>(.*)<.*media:.*(?:url="|>)(.*)(?:\?|\")
URL=""
[Feed]
Measure=WebParser
Url=#RSSLink#
RegExp="(?siU)#RegexPattern#
;Substitute=#Substitutes#
FinishAction=[!SetVariable URL "[Item1Image]"][!EnableMeasure "MeasureDownloadImage"][!CommandMeasure "MeasureDownloadImage" "Update"]
[Item1Image]
Measure=WebParser
Url=[Feed]
StringIndex=3
;Download=1
;DownloadFile=1.png
DynamicVariables=1
DecodeCharacterReference=1
Substitute=#Substitutes#
[MeasureDownloadImage]
Measure=WebParser
Url=#URL#
Download=1
DownloadFile=1.png
UpdateRate=600
DynamicVariables=1
Disabled=1
[Item1Thumbnail]
Meter=Image
MeasureName=MeasureDownloadImage
First see that I added a URL variable to the [Variables] section. This variable is empty at the begining, but will be set to the URL of the image, when the WebParser measure gets the needed URL (in the FinishAction option of the [Feed] measure).
I removed the Download and the DownloadFile options from the [Item1Image] measure, because as said, the image will be downloaded by a new WebParser measure (namely [MeasureDownloadImage], see below). Accordingly the [Item1Image] measure gets only the URL of the image. When it does this, the first bang (
[!SetVariable URL "[Item1Image]"]) of the FinishAction option of the [Feed] measure, sets the URL variable to the appropriate URL of the high resolution image.
The image will be downloaded only after this, by the newlly added [MeasureDownloadImage] measure:
Code: Select all
[MeasureDownloadImage]
Measure=WebParser
Url=#URL#
Download=1
DownloadFile=1.png
UpdateRate=600
DynamicVariables=1
Disabled=1
See thet this measure is disabled (by its
Disabled=1 option). When the URL variable gets the URL (as described above), which is happening when the parent WebParser measure finishes its work, the next two bangs of the FinishAction option of the [Feed] measure, enables the downloading measure (
[!EnableMeasure "MeasureDownloadImage"]) and are updating it (
[!CommandMeasure "MeasureDownloadImage" "Update"]), to let it to immediately download the image.
And this is working well now, the skin downloads this way the full resolution image. Please give it a try and let me know if I am right.
Weird is that first I tried to make all this without the URL variable, by simply adding the
Url=[Item1Image] option to the [MeasureDownloadImage] measure, but couldn't get it to work. Don't know why, were no error messages in the log.
SlowCircuit wrote: ↑April 10th, 2021, 9:40 pm
I was on Rainmeter 4.4 beta, so I downloaded the final release instead but it didn't make any difference.
Rarely does.