'The number of bits per seconds used in the audio coding (an
int). If this is provided explicitly by the compressed file
format, this is a precise reflection of the encoding. Otherwise,
it is estimated from the on-disk file size. In this case, some
imprecision is possible because the file header is incorporated
in the file size.'

@property
def bitrate(self):

    if (hasattr(self.mgfile.info, 'bitrate') and self.mgfile.info.bitrate):
        return self.mgfile.info.bitrate
    else:
        if (not self.length):
            return 0
        size = os.path.getsize(self.path)
        return int(((size * 8) / self.length))
