'Returns the total amount of up or downloaded bytes.
@return The amount in bytes.'

def get_total_transferred(self, direct):

    if (self.stats is None):
        return 0
    if (direct == UPLOAD):
        return self.stats['stats'].upTotal
    else:
        return self.stats['stats'].downTotal
