Пример #1
0
 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))
Пример #2
0
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 '---'
Пример #3
0
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 '---'