[mythtv-commits] Ticket #4278: Return the storage group data using a more sensible XML approach.

MythTV mythtv at cvs.mythtv.org
Fri Dec 7 02:53:14 UTC 2007


#4278: Return the storage group data using a more sensible XML approach.
------------------------------------------------+---------------------------
 Reporter:  Andrew Ruthven <andrew at etc.gen.nz>  |       Owner:  ijr    
     Type:  enhancement                         |      Status:  new    
 Priority:  minor                               |   Milestone:  unknown
Component:  mythtv                              |     Version:  head   
 Severity:  medium                              |     Mlocked:  0      
------------------------------------------------+---------------------------
 Currently the XML returns information about the storage groups as a long
 list of attributes of one element which looks like this:

   <MachineInfo>
    <Storage drive_total_free="1479558" drive_total_used="1358490"
 drive_1_used="662884" drive_2_used="93351" drive_1_dirs="slave:/mnt/
 tvrecordings,slave:/tvrecordings" fsids="1,2,4,total"
 drive_2_dirs="slave:/nas,Myth-Livingroom:/nas"
 drive_total_total="2838049" drive_4_free="101920"
 drive_2_total="1429698" drive_1_total="704175"
 drive_total_dirs="TotalDiskSpace" drive_4_used="602254"
 drive_4_dirs="Myth-Livingroom:/hdrecordings" drive_1_free="41291"
 drive_4_total="704175" drive_2_free="1336346" />
    <Load avg1="0" avg2="0" avg3="0" />
    <Guide guideDays="14" status="Successful."
 next="2007-11-27T22:41:46" end="2007-11-27 02:31"
 guideThru="2007-12-11T03:00:00" start="2007-11-27 02:31" >Your
 subscription expires on 06/19/2008 10:23:34 PM</Guide>
   </MachineInfo>

 This requires a bit more work to parse.  The attached parse returns the
 same information in a more XML kind of way which looks like (different
 storage groups):

  <MachineInfo>
   <Storage>
    <Group dir="cyclops:/home/andrew/myth6" free="18825" id="1"
 total="50396" used="31570" />
    <Group
 dir="cyclops:/scratch/myth2,cyclops:/tmp/myth1,cyclops:/tmp/myth3,cyclops:/tmp/myth4"
 free="10644" id="2" total="20746" used="10101" />
    <Group dir="TotalDiskSpace" free="29470" id="total" total="71143"
 used="41672" />
   </Storage>
   <Load avg1="0.79" avg2="0.4" avg3="0.28" />
   <Guide status="" next="1970-01-01T00:00:00" end="" start="" ></Guide>
  </MachineInfo>

 The HTML generation code in httpstatus.cpp handles this new layout as
 well.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4278>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list