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