Fixed hours on songs

This commit is contained in:
Kwoth 2017-01-03 19:56:39 +01:00
parent 0a26444975
commit fc454d3c3f

View File

@ -62,7 +62,15 @@ namespace NadekoBot.Modules.Music.Classes
else if (TotalTime == TimeSpan.MaxValue) else if (TotalTime == TimeSpan.MaxValue)
return "∞"; return "∞";
else 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;
}
} }
} }