home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Graveyard
InfoService
*ORIGINAL THREAD* InfoService v1.6 - Feed reader/Twitter reader and weather
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="pilehave" data-source="post: 572736" data-attributes="member: 71550"><p><strong>Re: InfoService v1.32 - 5 day weather/Feeds/Twitter on basic home [04-01-2010] *PLANN</strong></p><p></p><p></p><p></p><p>Oh, well that kinda makes sense though, as the updaterate is set to 60 minutes <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> I just assumed that when you changed the city the rest of the info was updated.</p><p></p><p>If may suggest a method of getting the updated info immediately, this could be done:</p><p></p><p>Subscribe to the eventhandler in the Start() function (which is run when a plugin starts):</p><p></p><p>[CODE]GUIGraphicsContext.OnNewAction += new OnActionHandler(OnAction);[/CODE]</p><p></p><p>Then you can catch any user-actions with:</p><p></p><p>[CODE]</p><p>// Catch actions up, down, enter/play and home/back/etc.</p><p>public void OnAction(Action action)</p><p>{</p><p></p><p>int actwin = GUIWindowManager.ActiveWindowEx;</p><p>if (actwin == 2600) //Weather screen</p><p>{</p><p>//I believe these are the valid actions for Enter/Play/Mouse click.</p><p>if(action.wID == Action.ActionType.ACTION_MUSIC_PLAY || action.wID == Action.ActionType.ACTION_MOUSE_CLICK || action.wID == Action.ActionType.ACTION_SELECT_ITEM)</p><p>{</p><p>//update from cached weather-file and set some kind of flag</p><p>}</p><p>}</p><p>}</p><p>[/CODE]</p><p></p><p>Of course you need to create some kind of logic to avoid updating the weather every time the user clicks something. And you would probably need to wait for some seconds while the cached file is updated by MediaPortal...</p></blockquote><p></p>
[QUOTE="pilehave, post: 572736, member: 71550"] [b]Re: InfoService v1.32 - 5 day weather/Feeds/Twitter on basic home [04-01-2010] *PLANN[/b] Oh, well that kinda makes sense though, as the updaterate is set to 60 minutes :D I just assumed that when you changed the city the rest of the info was updated. If may suggest a method of getting the updated info immediately, this could be done: Subscribe to the eventhandler in the Start() function (which is run when a plugin starts): [CODE]GUIGraphicsContext.OnNewAction += new OnActionHandler(OnAction);[/CODE] Then you can catch any user-actions with: [CODE] // Catch actions up, down, enter/play and home/back/etc. public void OnAction(Action action) { int actwin = GUIWindowManager.ActiveWindowEx; if (actwin == 2600) //Weather screen { //I believe these are the valid actions for Enter/Play/Mouse click. if(action.wID == Action.ActionType.ACTION_MUSIC_PLAY || action.wID == Action.ActionType.ACTION_MOUSE_CLICK || action.wID == Action.ActionType.ACTION_SELECT_ITEM) { //update from cached weather-file and set some kind of flag } } } [/CODE] Of course you need to create some kind of logic to avoid updating the weather every time the user clicks something. And you would probably need to wait for some seconds while the cached file is updated by MediaPortal... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Graveyard
InfoService
*ORIGINAL THREAD* InfoService v1.6 - Feed reader/Twitter reader and weather
Contact us
RSS
Top
Bottom