Fixed regex for links with just numeric time

This commit is contained in:
Seregy 2016-08-11 00:38:51 +03:00
parent 645bb1bd85
commit 034fe99f3f

View File

@ -298,7 +298,7 @@ namespace NadekoBot.Modules.Music.Classes
if (video == null) // do something with this error
throw new Exception("Could not load any video elements based on the query.");
var m = Regex.Match(query, @"\?t=((?<h>\d*)h)?((?<m>\d*)m)?((?<s>\d*)s)?");
var m = Regex.Match(query, @"\?t=((?<h>\d*)h)?((?<m>\d*)m)?((?<s>\d*)s?)?");
int gotoTime = 0;
if (m.Captures.Count > 0)
{