Show FreeSpace/TotalSpace directly in Home

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
microuser Offline
Junior Member
Posts: 8
Joined: Apr 2013
Reputation: 0
Post: #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
find quote
`Black Offline
Skilled Skinner
Posts: 2,019
Joined: Apr 2009
Reputation: 50
Location: Germany
Post: #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: xp1080-21.png]
(This post was last modified: 2013-04-28 15:37 by `Black.)
find quote
microuser Offline
Junior Member
Posts: 8
Joined: Apr 2013
Reputation: 0
Post: #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
find quote
ronie Offline
Team-XBMC Member
Posts: 8,259
Joined: Jan 2009
Reputation: 108
Post: #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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
microuser Offline
Junior Member
Posts: 8
Joined: Apr 2013
Reputation: 0
Post: #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?
find quote
`Black Offline
Skilled Skinner
Posts: 2,019
Joined: Apr 2009
Reputation: 50
Location: Germany
Post: #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: xp1080-21.png]
find quote
microuser Offline
Junior Member
Posts: 8
Joined: Apr 2013
Reputation: 0
Post: #7
Sorry, but I'm a newbie, how can I do that?

Thanks
find quote
nessus Offline
Skilled Skinner
Posts: 584
Joined: Apr 2009
Reputation: 12
Location: Rodos, Greece
Post: #8
http://trac.xbmc.org/
find quote
garbear Offline
Team-XBMC Developer
Posts: 426
Joined: Dec 2010
Reputation: 16
Location: gangsta's paradise
Post: #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!

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
(This post was last modified: 2013-05-05 11:16 by garbear.)
find quote