def __GetStatsLine(self): if self.allconflicts: return "%s (%d conflicts), %s, %s" % ( pluralize(self.get_stat('filecount'), 'song'), len(self.allconflicts), format_time_decimal(self.get_stat('duration')), format_size(self.get_stat('size'), 2)) else: return "%s, %s, %s" % ( pluralize(self.get_stat('filecount'), 'song'), format_time_decimal(self.get_stat('duration')), format_size(self.get_stat('size'), 2))
def format_timestamp(t, delta): if delta: return format_time_decimal(t) else: if t > 0: return time.strftime('%Y/%m/%d %H:%M:%S', time.localtime(t)) else: return '---'