From fc454d3c3f1956a9cd0f91dcbb734225b00acd1d Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 3 Jan 2017 19:56:39 +0100 Subject: [PATCH] Fixed hours on songs --- src/NadekoBot/Modules/Music/Classes/Song.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Modules/Music/Classes/Song.cs b/src/NadekoBot/Modules/Music/Classes/Song.cs index 6a614eec..0ee23fd4 100644 --- a/src/NadekoBot/Modules/Music/Classes/Song.cs +++ b/src/NadekoBot/Modules/Music/Classes/Song.cs @@ -62,7 +62,15 @@ namespace NadekoBot.Modules.Music.Classes else if (TotalTime == TimeSpan.MaxValue) return "∞"; else - return TotalTime.ToString(@"mm\:ss"); + { + var time = TotalTime.ToString(@"mm\:ss"); + var hrs = (int)TotalTime.TotalHours; + + if (hrs > 0) + return hrs + ":" + time; + else + return time; + } } }