Copy link
@ijc

ijc Mar 6, 2022

Contributor

@linuxdude42 This causes a regression if the time has >=24h in it (e.g. I have some playlists where the total time is more than 1 day)

This is because under the hood MythFormatTime (now MythDate::formatTime) uses QTime::toString which says that H is:

The hour without a leading zero (0 to 23, even with AM/PM display)

The previous code would happily return 24:mm:ss or even 234:mm:ss, now it returns the empty string (so depending on how far along you are in a long playlist you either get / or H:mm:ss / ).

I can't see how to return to the old behaviour when using QTime under the hood. It doesn't look like QDateTime would do what we need either.

We could manually extract the number of days and prepend it, either here or in MythDate::formatTime?

Any better ideas?