Show FreeSpace/TotalSpace directly in Home
#1
Hi.

I'm trying to get the System.FreeSpace and System.TotalSpace information visible, directly in main menu, along with the Date and Time information.

As I cannot see an easy way of doing it, I'm changing the includes.xml file to change the information visible.
If I use, for example, System.FreeMemory it displays correctly that info. But for the ones mentioned above, it doesn't work.
Anyone knows an easier way of getting this information?

I'm talking about these:
InfoLabels: http://wiki.xbmc.org/?title=InfoLabels
In includes.xml: $INFO[System.TotalSpace]

I want to have the information that appear in Settings>System>Storage always visible in the menus, like we have the date and the weather conditions.
Supposedly I could add the System.FreeSpace in the includes.xml to be able to do that, but for some reason it is not working...

Thanks
Reply
#2
The easiest solution if you want to show it all the time would be this:

Code:
<window type="dialog">
    <visible>!Window.IsVisible(startup) + !Window.IsVisible(fullscreenvideo) + !Window.IsVisible(visualisation) + !Window.IsVisible(screencalibration) + !Window.IsVisible(screensaver) + !Window.IsVisible(slideshow)</visible>
    <controls>
        <control type="label">
            [...]
            <label>$INFO[System.FreeSpace,, / ]$INFO[System.TotalSpace]</label>
        </control>
    </controls>
</window>

Create a file with this, name it Custom_SystemInfo.xml and put it to the 720p or 1080i folder of the skin you are using. You have to add the missing label values (position, size, font, textcolor etc.) so that it fits the skin, you can also add a background panel, add more labels, visible/hidden animations etc.

Another solution would be to find out where the clock code of the skin is and add your labels there.
Image
Reply
#3
Thanks for your reply.

I had already found the clock code.
If I insert there the "System.FreeMemory", it works as expected.
If I insert there the "System.TotalSpace" or "System.FreeSpace", it only returns: UNAVAILABLE

The problem could be in how to correctly use these last options. I saw that you specified "System.FreeSpace,, / ", this is to show the free space of root (/) ?
Is the same applied to TotalSpace?

Should I use something similar to:
System.FreeSpace,, /
System.TotalSpace,, /

This could be the reason of why I'm getting those "UNAVAILABLE"...

PS: Not at home right now, I will try that later

Thanks
Reply
#4
keep in mind there's always a chance those infolabels just won't work on the home screen.
not all infolabels are available all throughout the skin. some can only be used in specific windows.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
Tried these:
$INFO[System.FreeSpace,, / ]
$INFO[System.FreeSpace]
$INFO[System.FreeSpace(/) ]
$INFO[System.FreeSpace(sda1) ]
$INFO[System.FreeSpace(/dev/sda1) ]

but all return UNAVAILABLE.

My main problem should be that I'm not using the correct syntax, since I could have several hard drives (not the case), and I should be able to choose the correct one.
I've read that under windows it should be like: $info[system.freespace(e)]

Any ideas on how it should be under linux?
Reply
#6
There is nothing like System.FreeSpace(e), thats outdated. There is only System.FreeSpace and if that doesn't work, it doesn't work. You can add a trac ticket, maybe someone will look into it then.
Image
Reply
#7
Sorry, but I'm a newbie, how can I do that?

Thanks
Reply
#8
http://trac.xbmc.org/
Reply
#9
BTW, xbmc also has:
Code:
System.FreeSpace
System.UsedSpace
System.TotalSpace
System.UsedSpacePercent
System.FreeSpacePercent

but they all go through CSysInfo::GetDiskSpace().

You can see here that CSysInfo::GetDiskSpace() takes a drive as a parameter, but the info manager calls it from here, passing "" as the drive parameter. You can pass this info on to trac, it should be enough to get someone started on a pull request!
Reply

Logout Mark Read Team Forum Stats Members Help
Show FreeSpace/TotalSpace directly in Home0