[RELEASE] The Weather Channel (TWC) - Supplemental Script

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Spc4 Offline
Junior Member
Posts: 45
Joined: May 2008
Reputation: 0
Post: #11
Is there a download?
(This post was last modified: 2008-11-16 02:10 by Spc4.)
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,917
Joined: Dec 2004
Reputation: 17
Post: #12
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

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,917
Joined: Dec 2004
Reputation: 17
Post: #13
OSX now works.

here is the svn installer.

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

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
jeffbacon Offline
Junior Member
Posts: 11
Joined: Nov 2008
Reputation: 0
Post: #14
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).
find quote
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,341
Joined: Jan 2008
Reputation: 2
Location: US
Post: #15
This script is awesome, especially with PM3.HD integration

Thanks Nuka!

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,917
Joined: Dec 2004
Reputation: 17
Post: #16
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.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Livin Offline
Posting Freak
Posts: 3,432
Joined: May 2004
Reputation: 17
Location: above ground
Post: #17
any chance we can replace the default Weather screen with this?

I'm not an expert but I play one at work.
find quote
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,341
Joined: Jan 2008
Reputation: 2
Location: US
Post: #18
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

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
(This post was last modified: 2009-09-12 04:10 by rwparris2.)
find quote
jeffbacon Offline
Junior Member
Posts: 11
Joined: Nov 2008
Reputation: 0
Post: #19
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.
find quote
flamez Offline
Member
Posts: 90
Joined: Jul 2006
Reputation: 0
Post: #20
Great work!!! I really like it alot! Thanks again for all your Hard work!
find quote
Post Reply