mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-02 12:26:48 +01:00
Do something more sensible with negative times.
This commit is contained in:
parent
c9ddf09869
commit
d15fffc802
@ -70,6 +70,10 @@ void TrackSlider::SetStopped() {
|
||||
}
|
||||
|
||||
QString TrackSlider::PrettyTime(int seconds) {
|
||||
// last.fm sometimes gets the track length wrong, so you end up with
|
||||
// negative times.
|
||||
seconds = qAbs(seconds);
|
||||
|
||||
int hours = seconds / (60*60);
|
||||
int minutes = (seconds / 60) % 60;
|
||||
seconds %= 60;
|
||||
|
Loading…
x
Reference in New Issue
Block a user