mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-06 03:05:35 +00:00

+ rewrite load all albums + artist logic with itertools.groupby + add a function to convert seconds to string
12 lines
268 B
Python
12 lines
268 B
Python
import locale
|
|
|
|
# Set to user's default locale:
|
|
locale.setlocale(locale.LC_ALL, "")
|
|
|
|
# Or set to a specific locale:
|
|
# locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
|
|
|
|
|
|
def format_number(number: float) -> str:
|
|
return locale.format_string("%d", number, grouping=True)
|