mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
SoundPlayer: Correct formatting of PlaylistModel duration text
The previous code would format 5400 seconds as "1:90:00", when it should be "1:30:00".
This commit is contained in:
parent
7b4630932b
commit
f25adbd5ae
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ DeprecatedString PlaylistModel::format_filesize(u64 size_in_bytes)
|
||||||
|
|
||||||
DeprecatedString PlaylistModel::format_duration(u32 duration_in_seconds)
|
DeprecatedString PlaylistModel::format_duration(u32 duration_in_seconds)
|
||||||
{
|
{
|
||||||
return DeprecatedString::formatted("{:02}:{:02}:{:02}", duration_in_seconds / 3600, duration_in_seconds / 60, duration_in_seconds % 60);
|
return DeprecatedString::formatted("{:02}:{:02}:{:02}", duration_in_seconds / 3600, (duration_in_seconds / 60) % 60, duration_in_seconds % 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorOr<String> PlaylistModel::column_name(int column) const
|
ErrorOr<String> PlaylistModel::column_name(int column) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue