Drive Free Space Plugin

Discussion in 'MediaPortal 1 Plugins' started by SilentException, February 14, 2009.

  1. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    this is a process plugin i've made for displaying free HDD space on your drives.. it's highly configurable and flexible..

    install by putting three dll files in MP\plugins\process folder, run configuration and configure it as you like..

    next, you should add a new control in skin files where this should be used. this is an example i've made in a hurry but you'll get the point :)

    Example for main control (textual)
    Code (Text):
    1. <control>
    2.   <description>Drive space</description>
    3.   <type>textboxscrollup</type>
    4.   <id>37483</id>
    5.   <posX>1600</posX>
    6.   <posY>100</posY>
    7.   <width>300</width>
    8.   <height>300</height>
    9.   <font>font11</font>
    10.   <label>[B]#Drives.AvailableSpace.Data.Drives[/B]</label>
    11.   <visible>yes</visible>
    12. </control>
    Example for Progress bar control
    Code (Text):
    1. <control>
    2.   <description>Progress Bar</description>
    3.   <type>progress</type>
    4.   <id>20</id>
    5.   <posX>560</posX>
    6.   <posY>885</posY>
    7.   <width>500</width>
    8.   <height>30</height>
    9.   <label>[B]#Drives.AvailableSpace.Percentage[/B]</label>
    10.   <texturebg>progress_background_tvhome.png</texturebg>
    11.   <lefttexture>progress_blank30.png</lefttexture>
    12.   <midtexture>progress_mid_white30.png</midtexture>
    13.   <righttexture>progress_blank30.png</righttexture>
    14.   <visible>yes</visible>
    15. </control>
    hope you will like this, report your thoughts, bugs, whatever here :)


    Known "issues"



    If you're on Windows 7, sometimes there is issue with UAC and DriveFreeSpace not seeing network drives. Solution is to turn off UAC or try fix from the following TechNet article: Some Programs Cannot Access Network Locations When UAC Is Enabled
    Thanks to Larzon for helping me debug the issue!


    Changelog:

    v0.55
    changed (rewrote) component for drives selection (old one was not working properly on Win7) - old dll files (Raccoom.TreeViewFolderBrowser.dll and Raccoom.TreeViewFolderBrowser.DataProviders.dll) are no longer needed

    v0.51
    increased character limit on bitrate textbox to 5
    small changes in configuration

    v0.5
    due to change in MediaPortal properties, brackets cannot be part of the property names - all properties with (X) renamed to .X.
    added bitrate calculation (recording time left) - requested by daniel_1980
    property #Drives.AvailableSpace.Data split in two (#DriveFreeSpace.AvailableSpace.Data.Drives and #DriveFreeSpace.AvailableSpace.Data.Total) - .Drives works exactly as old one and .Total returns the formatted data for all selected drives - requested by cruse
    added #DriveFreeSpace.Enabled and #DriveFreeSpace.X.Enabled properties - first will contain true/false strings depending on weather any drive has been selected, second will contain true/false strings depending on weather drive X is selected - requested by Bleazle
    added possibility for multiple plugins: copy DriveFreeSpace.dll and rename it as you wish
    due to that possibility, all gui properties are prefixed with plugin file name now: instead of #Drives* properties, they are now named #DriveFreeSpace* or whatever the plugin file name is
    also, this now requires you to reconfigure the plugin
    fixed for MediaPortal v1.1

    v0.4
    added new gui properties #Drives.AvailableSpace.UsedPercentage and #Drives(X).AvailabelSpace.UsedPercentage; returns percentage of used space for all or one drive; replace X with the drive letter
    added new text property %uspercent% - returns a number (percent of occupied space)
    added new text property %usedspace% - returns used space in GB/MB/KB
    added new text property %driveletteronly% - returns drive letter only with no colon character

    v0.31
    all new lines are now processed only from configuration!
    fixed a small glitch in last build (30 seconds blackout on plugin start)

    v0.3
    added new gui properties #Drives(X).AvailableSpace.Data and #Drives(X).AvailableSpace.Percentage for each drive selected in configuration; replace X with the drive letter (doh!)

    v0.2
    fixed decimals
    added new text property %fspercent% - returns a number (percent) of free space
    added #Drives.AvailableSpace.Percentage - note that this returns percentage of free space of ALL drives you have selected in configuration.. i'm working on a version that will create a new property #Drives(X).AvailableSpace which will return .Data or .Percentage depending on what drives you have selected
    Renamed #Drives.AvailableSpace to #Drives.AvailableSpace.Data (i had problems with progress bar so i had to)

    v0.1
    initial release


    Note: since version 0.51, source is available on MediaPortal plugins repository (SourceForge), therefore no longer included in package
     

    Attached Files:

    Last edited by a moderator: September 22, 2012
    • Like Like x 19
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. 2BitSculptor
    • Team MediaPortal

    2BitSculptor Super Moderator

    Joined:
    January 23, 2008
    Messages:
    1,822
    Likes Received:
    290
    Occupation:
    Sculptor - Maquettes, Resin Figure Model Kits, Toy
    Location:
    South Central Wisconsin
    Ratings:
    +386 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    Looks useful. :)

    do you have a screen cap of what it would look like in a skin?

    Is there a way of showing drive space as a % bar also?

    Thanks

    Chuck
     
  4. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    that's the beauty of it.. you can format the output so it can llok like whatever you'd like.. you can put the text in different gui components,whatever fits you the most..

    nop, not yet, i'm not sure how to do this in a skin..what component you have to use?

    but it's a good idea, i'll add a new format string to return a number (percentage of free space)
     
  5. User 04

    User 04 Portal Pro

    Joined:
    April 14, 2008
    Messages:
    125
    Likes Received:
    21
    Ratings:
    +21 / 0
    Home Country:
    Thanks, this is excellent and I will be incorporating into the Retro skins :).

    I have just had a quick muck around , and as you can see from the screen print I have the data showing where the TV Preview window opens. I have disabled this display, as I think it is more decorative, than practical.

    I will also be incorporating this data into the other relevant screens.

    The only issue I have is with the spacing of displayed drive information.

    Is it possible to incorporate a spacing adjustment into the configuration.

    Have also deleted (%label%), as this makes the information more compact. BTW the screen prints are much clearer when I do them on my HTPC, this was done on my office computer.


    MEDIAPORTAL - free media center - Blue3 Retro Lite

    MEDIAPORTAL - free media center - Blue3wide Retro Lite
     
  6. catavolt
    • Team MediaPortal
    • Administrator

    catavolt Design Group Manager

    Joined:
    August 13, 2007
    Messages:
    12,193
    Likes Received:
    4,944
    Gender:
    Male
    Occupation:
    Technical Documentation, Translation
    Location:
    Lanzarote
    Ratings:
    +7,341 / 38
    Home Country:
    Germany Germany
    Show System Specs
    Hi, just installed your plugin and integrated it in the skin file for sys info (PureVision). I think the result is satisfying!
     

    Attached Files:

    • SystemInfo.jpg
      SystemInfo.jpg
      File size:
      175.1 KB
      Uploaded:
      February 14, 2009
      Views:
      2,002
  7. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    just remove any empty lines in the gui text format in configuration.. it should make a one by one line spacing..


    glad you both like it :)
     
  8. User 04

    User 04 Portal Pro

    Joined:
    April 14, 2008
    Messages:
    125
    Likes Received:
    21
    Ratings:
    +21 / 0
    Home Country:
    Thanks, much better, I must have inserted the extra lines without realizing :oops:.
     

    Attached Files:

    • 22-47-16.PNG
      22-47-16.PNG
      File size:
      167.1 KB
      Uploaded:
      February 14, 2009
      Views:
      1,387
  9. Bleazle
    • Premium Supporter

    Bleazle Well-Known Member

    Joined:
    July 14, 2007
    Messages:
    1,122
    Likes Received:
    253
    Gender:
    Male
    Occupation:
    Retired Skinner :-)
    Location:
    Pukekohe
    Ratings:
    +256 / 1
    Home Country:
    New Zealand New Zealand
    Show System Specs

    Looks like a handy plugin but I can't get anything to appear :( I've attached the XML file which has the code inserted - I want this info to appear in the empty box on the left hand side. As you can see the Plugin has been enabled - any ideas why nothing is showing up?

    Thanks

    Dave


    EDIT: I found the problem - it was me, not reading the instructions properly!! :p :oops: I had put the .dll files into the Plugins/Windows directory instead of the Plugins/Process directory.

    The attached screenshot is from my test computer - looks like I need to clean my C Drive up a bit!:D

    Great little plugin, thanks! This will be supported in the next release of the Bleazle skin.

    Dave
     

    Attached Files:

  10. catavolt
    • Team MediaPortal
    • Administrator

    catavolt Design Group Manager

    Joined:
    August 13, 2007
    Messages:
    12,193
    Likes Received:
    4,944
    Gender:
    Male
    Occupation:
    Technical Documentation, Translation
    Location:
    Lanzarote
    Ratings:
    +7,341 / 38
    Home Country:
    Germany Germany
    Show System Specs
    Yeah, with that number we could do a percentage line. Go for it, please!:D
     
  11. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    new version uploaded.. go for that percentage line! ;)

    edit: two new versions uploaded! text and percent for each drive was easier than i expected :)

    enjoy!
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!