Fixed song time on songs shorter than 1 minute

This commit is contained in:
Master Kwoth 2017-07-09 01:39:47 +02:00
parent fad0b908c8
commit f1a4a88730

View File

@ -341,7 +341,7 @@ namespace NadekoBot.Services.Music
return null;
}
TimeSpan time;
if (!TimeSpan.TryParseExact(data[4], new[] { "m\\:ss", "mm\\:ss", "h\\:mm\\:ss", "hh\\:mm\\:ss", "hhh\\:mm\\:ss" }, CultureInfo.InvariantCulture, out time))
if (!TimeSpan.TryParseExact(data[4], new[] { "ss", "m\\:ss", "mm\\:ss", "h\\:mm\\:ss", "hh\\:mm\\:ss", "hhh\\:mm\\:ss" }, CultureInfo.InvariantCulture, out time))
time = TimeSpan.FromHours(24);
return new SongInfo()