[mythtv] Mythweb tweak - show disk space in GB?
terribletadpole at gmail.com
Mon Nov 12 10:41:07 UTC 2018
You could put a rule around it to scale the value to MB, GB, TB, or PB (or
higher) to keep the value within the 1 to 999 range and display to three
That will adapt to everybody's setup for a few years.
On Mon, 12 Nov 2018, 6:41 PM Ian Campbell <ijc at hellion.org.uk wrote:
> On Sun, 2018-11-11 at 21:53 -0600, Richard Shaw wrote:
> > On Sun, Nov 11, 2018 at 3:01 AM Ian Campbell <ijc at hellion.org.uk>
> > wrote:
> > > On Sat, 2018-11-10 at 12:45 -0600, Richard Shaw wrote:
> > > > I'm not good with perl/php otherwise I would give it a try, but
> > > since
> > > > Mythweb is not going away in V30, what would it take to change
> > > the
> > > > backend status from MB to GB... With HDTV and modern disks I
> > > don't
> > > > think it make sense to report MB anymore and it's difficult to
> > > read
> > > > when I have a 3TB main drive and a dedicated 2TB drive for
> > > > recordings.
> > >
> > > I think the code you want is actually in
> > > mythtv/programs/mythbackend/httpstatus.cpp and is just proxied by
> > > mythweb so lack of Perl/php shouldn't be a barrier.
> > A bit closer... I found the bit shifts ">>10" and changed them to
> > ">>20" for GB but still need to find where to change "MB" to "GB"...
> It's a bit further down the same file:
> int nUsed = g.attribute("used" , "0" ).toInt();
> os << " <li>Space Used: ";
> sRep = c.toString(nUsed) + " MB";
> os << sRep << "</li>\r\n";
> If it were me to avoid them getting out of sync I would move the >>10
> and the naming of the units next to each other, by making the
> attributed and nUsed and friends use bytes as the units, and doing the
> shift in the latter bit of code right where the "MB" (or "GB") was
> appended, but maybe that's just me and perhaps you are looking for the
> smallest change to make.
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> MythTV Forums: https://forum.mythtv.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-dev