Hello all!

I'm new to Freevo development and have fixed a few things in version 1.5.3 in the last week.  I'd like to share those fixes with everyone.

First, when using the INFO skin, I noticed that disk space would occasionally be displayed as "30,60 of 80,xxx MB free when viewing a directory.  To fix this, I changed:

        if key in ( 'freespace', 'totalspace' ):
            if self.media:
                return None
           
            space = getattr(util, key)(self.dir) / 1000000
            if space > 1000:
                space='%s,%s' % (space / 1000, space % 1000)
            return space

to read:

        if key in ( 'freespace', 'totalspace' ):
            if self.media:
                return None
           
        # Changed to use binary calculations
            space = getattr(util, key)(self.dir) / 1048576
            if space > 1024:
        high = str(space / 1024)
        low = str(space % 1024)
                space='%s,%s' % (high, low.zfill(3))
            return space

Note that I also changed the calculation to use binary multiples rather than the previous decimal calculation.  By adding .zfill(3) I get the correct number of digits displayed.

I am now in the process of changing the mixer.py plugin.  So far I have managed to get full control of 6-channel audio.  I'll be adding a flag to local_conf.py to mark which audio control mode is to be used, i.e. 2CH, 4CH or 6CH.  The majority of the change revolves around using amixer rather than control register access.  I'm not sure if ALSA is in use on all distros or not but I'm sure a workaround can be found in the event it isn't.  If anyone can come up with a way to incorporate changing audio modes on the fly via the interface, please let me know.  I'll post the new mixer.py when I'm finished.


How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to