Show "LIVE" in duration if a stream has been requested

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2023-12-30 16:33:00 +03:00
parent 09444e8465
commit 6e72646e2a
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1

View file

@ -29,9 +29,13 @@ public static class LavalinkTrackExtensions
builder.Append(" by ").Append(Markdown.Sanitize(track.Author));
}
var duration = track.Duration;
builder.Append($" ({duration.ReadableDuration()})");
if (track.IsLiveStream)
{
builder.Append($" ({Markdown.Bold("LIVE")})");
return builder.ToString();
}
builder.Append($" ({track.Duration.ReadableDuration()})");
return builder.ToString();
}
}