mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +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
Notes:
sideshowbarker
2024-07-16 19:17:47 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/f25adbd5ae Pull-request: https://github.com/SerenityOS/serenity/pull/20087 Reviewed-by: https://github.com/trflynn89
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)
|
||||
{
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue