XBMC Community Forum
[RELEASE] The Weather Channel (TWC) - Supplemental Script - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Weather Add-ons (/forumdisplay.php?fid=155)
+---- Thread: [RELEASE] The Weather Channel (TWC) - Supplemental Script (/showthread.php?tid=40338)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


- Spc4 - 2008-11-16 02:03

Is there a download?


- Nuka1195 - 2008-11-16 02:49

It's in svn the addons svn, but if anybody uses osx, it's broken in svn.

i have a fix, but need to test it.

use the svn repo installer to grab it or svn client, link in first post


- Nuka1195 - 2008-11-16 04:00

OSX now works.

here is the svn installer.

http://xbmc-addons.googlecode.com/svn/packages/plugins/programs/SVN_Repo_Installer.zip


- jeffbacon - 2008-11-16 16:24

Nuka1195 Wrote:the good news is once you have the metric source it scrapes the same. but there is no difference in the url that i can see.

so if you figure out how to grab the correct page, your set.

When you click the English/Metric link it sets cookie values. My cookie is:

UserPreferences: 3%7C%20%7C0%7Creal%7Cfast%7C1%7C1%7C1%7C1%7C-1%7C%20%7C%20%7C%20%7C%20%7C%20%7C1%7CBusinessTravel%7C%20%7C%20%7C%20%7C%20%7C%​20%7C%20%7C%20%7C%20%7C%20%7C%7C

The links call a JS function named setUserPreferences:

Metric:
setUserPreferences(5,1);
setUserPreferences(6,1);
setUserPreferences(7,1);
setUserPreferences(8,1);
setUserPreferences(15,1)

English:
setUserPreferences(5,0);
setUserPreferences(6,0);
setUserPreferences(7,0);
setUserPreferences(8,0);
setUserPreferences(15,0)

5 -> English(0) vs Metric (1)

But I can't see where the others are used. There must be an included script that generates the weather summaries that uses them. I assume they represent temp (C=1/F=0), wind (mph=0/kph=1), visibility (miles=0/km=1), and pressure (mb=1/in=0).


- rwparris2 - 2008-11-16 16:29

This script is awesome, especially with PM3.HD integration

Thanks Nuka!


- Nuka1195 - 2008-11-16 17:33

thanks and your welcome,

jeffbacon, good info, maybe if the user supplied there own cookie i could use that, i have no way to click that link. i'll play around later.

new update, adds avg info for weekend for days expired.


- Livin - 2008-11-16 18:59

any chance we can replace the default Weather screen with this?


- rwparris2 - 2008-11-16 20:00

Livin Wrote:any chance we can replace the default Weather screen with this?

In whatever skin you're using, you could point the weather button/item to this script instead of where it normally points to by modifying the XML


- jeffbacon - 2008-11-16 20:29

Nuka1195 Wrote:jeffbacon, good info, maybe if the user supplied there own cookie i could use that, i have no way to click that link. i'll play around later.

(even though I'm posting a lot on metric integration the script rocks already)

If that UserPreferences cookie doesn't have the city code in it (which I don't think it does as there's a LocID cookie with that in it) then maybe you can hard-code a UserPreferences that has metric set.


- flamez - 2008-11-16 20:31

Great work!!! I really like it alot! Thanks again for all your Hard work!