Kodi Community Forum

Full Version: Weather widget missing on home screen...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
On the home screen, I am unable to get the weather widget to show. It seems like what is displayed when you click weather is what the weather widget should look like on the home screen.

This is on the 2.0 Jarvis version.


--- I solved this by looking into the Includes_Home.xml

The issue has to do with the weather information not registering as an "item" - so the check for number of items greater than 0 came back as false. I added an "or" clause to ignore this if the weather widget is in focus and copied over the information from the MyWeather.xml to format the left and right home widgets.

Looks like the following:

Image

You can look at the code here: https://www.dropbox.com/s/99axqkitg2dvfd...e.xml?dl=0

I know this function isn't for everyone - but I like it and want to make it available to others. :-)
Thanks. Is this also solving the problem that the weather under the clock in the top right corner is never showing / always stays at 0 degrees Celsius?

What lines of code did you add exactly, by the way?
This won't impact the weather icon in the header bar. If you have setup the weather widget in settings, you should get an updated number in the header.

What happens when you select the weather menu item?

As for the file changes - probably easiest to look at the file linked above. I labeled the weather widget code inside. There are a couple of other lines changed in home widget left and home widget right to adapt the visibility of the widgets based on the menu item that is in focus.
Good day/night @edit4ever. I use eminence mod 2.0 by guilouz skin in kodi jarvis on Windows 10 and i looked at your code changes and applied them and set the weather widget but still when going back to homescreen, weather widget won't show up at all. I use it with OpenWeatherMap Extended addon.

Here are the relevant files:
https://www.dropbox.com/sh/kypekx0415dqa...ba7La?dl=0

Thank you in advance!

Update: copied the relevant files from the 16x9.zip you shared to me in another thread and now weather widget shows up but there is a minor glitch
Image
(2016-10-30, 17:54)Veronica Wrote: [ -> ]Here are the relevant files:
https://www.dropbox.com/sh/kypekx0415dqa...ba7La?dl=0

The changes should be made in the Includes_Home.xml - I didn't see that file in the group above. Also - I assume you have set the always show posters option for widgets?
(2016-10-30, 19:02)edit4ever Wrote: [ -> ]
(2016-10-30, 17:54)Veronica Wrote: [ -> ]Here are the relevant files:
https://www.dropbox.com/sh/kypekx0415dqa...ba7La?dl=0

The changes should be made in the Includes_Home.xml - I didn't see that file in the group above. Also - I assume you have set the always show posters option for widgets?

duh! sorry about that, i replaced the file anyway. I added the original Includes_Home.xml which is 115kb compared to your modded file 56,9kb. I see that i have to add the mods manually because replacing the file might create other issues and changes some settings and colors i already had. Thing is i dont know what portion of the code will truly enable the weather widget.

Please check my post above i updated it, i replaced Includes_Home.xml with your file and widget shows up but there is a glitch. I have to figure it out all the relevant code to add/change
Ahaha almost there, i made changes to the original file and voila but still there are some glitches left but at least it is less than before. I'll upload the modified file to Dropbox so you can take a look Smile
Image
I can't seem to open your modified Includes_Home.xml file...
Got it - in this case, since you're including the weather widget code - the left side is duplicating because you've commented out line 1406:

<!-- <visible>IntegerGreaterThan(Container(9001).NumItems,0)</visible>-->

My guess is the weather widget code works in the eminence mod 2.0 version....so you don't need to fix this line. Try putting this line back to normal:

<visible>IntegerGreaterThan(Container(9001).NumItems,0)</visible>

And see if that removes the duplicate info on the left widget.
If that doesn't work (makes the whole thing disappear) then we'll need to add a clause to the widget left code to tell the original lines not to show when the weather menu is in focus.
Ok done but in this case all left part of the weather widget dissapeared, the right part is intact.
Thank you!
OK - go ahead and comment that line out again.

Then add the following after line 1469:

<visible>!StringCompare(Container(9000).ListItem.Property(widget),Weather)</visible>


See if that removes the duplicate info on the left part of the widget.
(2016-10-30, 22:21)edit4ever Wrote: [ -> ]OK - go ahead and comment that line out again.

Then add the following after line 1469:

<visible>!StringCompare(Container(9000).ListItem.Property(widget),Weather)</visible>


See if that removes the duplicate info on the left part of the widget.

BINGO! that did it, thank you very much.... i don't think it can break something else but i'll test some more just in case.
Image

Final Includes_Home.xml can be found here for anyone interested:
https://www.dropbox.com/s/livosadbcphlur...e.xml?dl=0
(2016-10-30, 23:47)Veronica Wrote: [ -> ]BINGO! that did it, thank you very much.... i don't think it can break something else but i'll test some more just in case.

Great! BTW saw you live in Barcelona. Lived there for two months a couple of years ago...fun place to live!