From 0279fd2b6c0581fe7d0dad7372635ea1bb14a9ec Mon Sep 17 00:00:00 2001 From: Timothy D Witham Date: Tue, 15 Aug 2023 00:24:40 -0500 Subject: [PATCH] MythMusic: show altered speed by appending to [playlist]time --- mythplugins/mythmusic/mythmusic/musiccommon.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mythplugins/mythmusic/mythmusic/musiccommon.cpp b/mythplugins/mythmusic/mythmusic/musiccommon.cpp index 6dc009610f4..5295422e349 100644 --- a/mythplugins/mythmusic/mythmusic/musiccommon.cpp +++ b/mythplugins/mythmusic/mythmusic/musiccommon.cpp @@ -2141,10 +2141,15 @@ QString MusicCommon::getTimeString(std::chrono::seconds exTime, std::chrono::sec { if (maxTime <= 0ms) return MythDate::formatTime(exTime, - (exTime >= 1h) ? "H:mm:ss" : "mm:ss"); + (exTime >= 1h) ? "H:mm:ss" : "mm:ss"); QString fmt = (maxTime >= 1h) ? "H:mm:ss" : "mm:ss"; - return MythDate::formatTime(exTime, fmt) + " / " + MythDate::formatTime(maxTime, fmt); + QString out = MythDate::formatTime(exTime, fmt) + + " / " + MythDate::formatTime(maxTime, fmt); + float speed = gPlayer->getSpeed(); + if (int(speed * 100.0F + 0.5F) != 100) // v34 - show altered speed + out += QString(", %1").arg(speed); + return out; } void MusicCommon::searchButtonList(void)