Weather Channel APi change

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ReducedToZero Offline
Senior Member
Posts: 102
Joined: Jun 2011
Reputation: 4
Post: #31
spiff Wrote:this completes my useless work on this matter. thanks commenters on xbmc.org for making it oh so fun to do all this crap for you guys!

Not useless and very much appreciated by the (mostly) silent majority.

Thank you Spiff.

'Zero

-----
XBMC Dharma (Taking a look at Eden) | Windows Vista | Aeon Nox 1.7
-----
On a long enough timeline. The survival rate for everyone drops to zero.
find quote
hentai23 Offline
Fan
Posts: 679
Joined: Sep 2010
Reputation: 0
Location: another universe ..it would seem xD
Post: #32
huh ? what did i say , btw i dont think spiff meant me , never said anything about his work in a negative manner did i now ....-.-' , except that hes doing a killer job and that maybe i wanted my weather working again , wich it is except for the 4day forecast xD
(This post was last modified: 2011-11-15 19:15 by hentai23.)
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #33
yes, it was directed at others, in particular mr fish or whatever it was on the xbmc.org comment section.
find quote
hentai23 Offline
Fan
Posts: 679
Joined: Sep 2010
Reputation: 0
Location: another universe ..it would seem xD
Post: #34
ohhh thank god ..that was close ...lol xD

funny people asuming as soon as people talk about negative comments it being me automatically ...lol ... all i do is contribute constructive feedback some people dont understand that it seems they should point theyre fingers to emselfes for a change -.-'

p.s: keep up da good work spiff you da man !
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #35
to be fair, it was due to my ffs post earlier in the thread i think.
find quote
hentai23 Offline
Fan
Posts: 679
Joined: Sep 2010
Reputation: 0
Location: another universe ..it would seem xD
Post: #36
xD
find quote
LStranger Offline
Junior Member
Posts: 34
Joined: Apr 2010
Reputation: 0
Post: #37
Good job, weather now works for me. Unfortunately I cannot use Git version right now because stream listening is broken in it but listening internet-radio is one of main purposes to use XBMC in my case so I've did rollback to working 10.1.
find quote
ReducedToZero Offline
Senior Member
Posts: 102
Joined: Jun 2011
Reputation: 4
Post: #38
Hi Spiff,

In the changes for Weather, looking at this commit (xbmc/utils/Weather.cpp - 288/289), it seems WEATHER_BASE_PATH + "128x128/" is automatically prepended to any weather icon string passed from an Addon to XBMC.

This seems to make it impossible to pass an arbitrary local or remote icon.

Is there a workaround to do it? or could the prepend be removed and Addons pass the full special://temp/weather/128x128/ to use the built in icons?

Thanks again for dealing with the whole weather thing.

'Zero

-----
XBMC Dharma (Taking a look at Eden) | Windows Vista | Aeon Nox 1.7
-----
On a long enough timeline. The survival rate for everyone drops to zero.
(This post was last modified: 2011-11-24 14:06 by ReducedToZero.)
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #39
hmm, that makes sense.
find quote
ReducedToZero Offline
Senior Member
Posts: 102
Joined: Jun 2011
Reputation: 4
Smile  Unsetting weather properties
Post: #40
Thank you Spiff.

One last request (promise),

As strtol() returns a '0' if no conversion occurred it's currently impossible to unset some weather related window properties. Skinners are using a !IsEmpty test in the visibility conditions for many weather labels (Current temp, high temp etc) which is always going to pass.

Would it be possible to add tests in weather.cpp around the various strtol()'s for a value of -999 (as 0 is a valid value and -999 should never legitimately occur) which would set the relevant window property to a null string?

Use case is for weather Addons which can't or don't provide the full 4 days minimum data most Skins expect.

Alternatively I could ask skinners to support a day[0-4].isHidden window property but that seems a bit hacky as they are already checking against the various properties directly.

'Zero

-----
XBMC Dharma (Taking a look at Eden) | Windows Vista | Aeon Nox 1.7
-----
On a long enough timeline. The survival rate for everyone drops to zero.
(This post was last modified: 2011-11-27 11:45 by ReducedToZero.)
find quote
ReducedToZero Offline
Senior Member
Posts: 102
Joined: Jun 2011
Reputation: 4
Post: #41
Sorry to keep posting here, if this isn't the best place to raise things please let me know.

I think there's also a small issue with Humidity in weather.cpp (Line 309)

Code:
m_info.currentHumidity.Format("%s%%",window->GetProperty("Current.Humidity").asString().c_str());

In the event of the weather data not being refreshed, due to a dropped internet connection for example, this appends % to the existing property string, which due to not being refreshed isn't a bare number. The property then ends up as e.g. 80%%%

'Zero

-----
XBMC Dharma (Taking a look at Eden) | Windows Vista | Aeon Nox 1.7
-----
On a long enough timeline. The survival rate for everyone drops to zero.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #42
i'm only taking input in patch form from now on.
find quote
Post Reply