Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 9cc226f

Browse files
'backup'
1 parent eb5e9e9 commit 9cc226f

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

domain/audit/stats/ClipStats.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from protocol0.domain.lom.track.group_track.external_synth_track.ExternalSynthTrack import (
77
ExternalSynthTrack,
88
)
9+
from protocol0.domain.shared.utils.utils import get_minutes_legend
910
from protocol0.shared.SongFacade import SongFacade
1011

1112

@@ -32,6 +33,6 @@ def to_dict(self):
3233
output["clips count"] = len(self.clips)
3334
output["abstract clips count"] = len(self.abstract_clips)
3435
output["audio clips count"] = len(self.audio_clips)
35-
output["recorded audio duration"] = "%.2fs" % self.recorded_audio_duration
36+
output["recorded audio duration"] = get_minutes_legend(self.recorded_audio_duration)
3637

3738
return output

domain/shared/utils/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ def get_length_legend(beat_length, signature_numerator):
3838
return "%d bar%s" % (bar_length, "s" if bar_length > 1 else "")
3939

4040

41+
def get_minutes_legend(seconds):
42+
# type: (float) -> str
43+
minutes = int(seconds / 60)
44+
seconds = int(seconds % 60)
45+
46+
return "%d:%d" % (minutes, seconds)
47+
48+
4149
live_factor = 6 / math.log10(1.0 / Config.ZERO_VOLUME)
4250

4351

0 commit comments

Comments
 (0)