It is currently April 24th, 2024, 1:48 am

Stop weather from refreshing on skin refresh?

Get help with creating, editing & fixing problems with skins
User avatar
Fluffybutt
Posts: 4
Joined: September 11th, 2018, 12:19 am

Stop weather from refreshing on skin refresh?

Post by Fluffybutt »

I have a skin that has weather and a lot more all as one, which means it gets refreshed a lot when changing options and editing shortcuts. That also means re-grabbing the weather every time, which I've read can get your IP banned. If that's false, I don't need help, but if true, I need to be able to not grab the weather on skin refresh. To grab it based just off the UpdateRate or if nothing's been grabbed yet. Is that possible?

As of now, I made a workaround by adding a disable/enable weather to the context menu.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Stop weather from refreshing on skin refresh?

Post by kyriakos876 »

Fluffybutt wrote: October 23rd, 2018, 11:36 am I have a skin that has weather and a lot more all as one, which means it gets refreshed a lot when changing options and editing shortcuts. That also means re-grabbing the weather every time, which I've read can get your IP banned. If that's false, I don't need help, but if true, I need to be able to not grab the weather on skin refresh. To grab it based just off the UpdateRate or if nothing's been grabbed yet. Is that possible?

As of now, I made a workaround by adding a disable/enable weather to the context menu.
You might get your IP banned if your're refreshing the skin many times for a long period of time. If you refresh it once or twice in one minute you'll be fine. How faster are you going to refresh it anyway? I suppose you refresh because you are making micro-changes to the code and want to see the result... If you can modify the code faster than 2 times a minute for a long period of time I'd be surprised. If you do, disabling the weather is the only option, as everytime you refresh the skin it will, no matter what, re-grab everything.

Generally it's a good idea to have a separate skin or the weather. (In my opinion that is...) :welcome:

As long as we talk about weather sites, I don't think they have any serious DDOS protection that will ban you instantly after parsing something 100 times in one second...
Last edited by kyriakos876 on October 23rd, 2018, 11:55 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Stop weather from refreshing on skin refresh?

Post by jsmorley »

No amount of manual refreshing, and to be honest like not even any amount of automatic refreshing, is going to get you banned from a weather website. What would trigger some reaction would be something they detect as a DoS (denial of service) attack, which is going to be more like hundreds of times a minute or more.

As to your specific question, you would have to physically write all the current values you are getting from the site to a file using the !WriteKeyValue bang every time they changed, along withe the current time, in order for them to survive a refresh, which entirely restarts the skin. While theoretically possible, in my opinion this would be a lot of pretty complicated work for very little benefit.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Stop weather from refreshing on skin refresh?

Post by Mor3bane »

In view of this question, I "think" it may have originally came up in reference to very low refresh rates, as in a skin with a counter that managed an animated gif. However, the simple solution was to use UpdateDivider on the parser measures in a multiple the would bring down those refresh rates say from 20 ms back to 1000 ms ( Update Divider=50 for example ).
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Fluffybutt
Posts: 4
Joined: September 11th, 2018, 12:19 am

Re: Stop weather from refreshing on skin refresh?

Post by Fluffybutt »

Hopefully it'll be fine then. Switching between all the colour variants and changing the font colour via the context menu is mostly what has me worried. Separating the weather into a different config isn't possible with this skin either. It's kind of an all-in-one thing. I've finished it and uploaded it on dA if anybody's curious.