]>
Commit | Line | Data |
---|---|---|
1df30f07 | 1 | # -*- coding: utf-8 -*- |
bb69f62e IB |
2 | import sys |
3 | import os | |
4 | ||
5 | def path(): | |
6 | if getattr(sys, 'frozen', False): | |
7 | return sys._MEIPASS + "/" | |
8 | else: | |
9 | path = os.path.dirname(os.path.realpath(__file__)) | |
10 | return path + "/../" | |
11 | ||
98ff4305 IB |
12 | def duration_to_min_sec(duration): |
13 | minutes = int(duration / 60) | |
14 | seconds = int(duration) % 60 | |
15 | if minutes < 100: | |
16 | return "{:2}:{:0>2}".format(minutes, seconds) | |
17 | else: | |
18 | return "{}:{:0>2}".format(minutes, seconds) |