Skip to content

Commit

Permalink
MythMusic: show altered speed by appending to [playlist]time
Browse files Browse the repository at this point in the history
  • Loading branch information
twitham1 authored and linuxdude42 committed Aug 18, 2023
1 parent 134cff1 commit 0279fd2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mythplugins/mythmusic/mythmusic/musiccommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0279fd2

Please sign in to comment.