Fixed regex for links with just numeric time
This commit is contained in:
parent
645bb1bd85
commit
034fe99f3f
@ -298,7 +298,7 @@ namespace NadekoBot.Modules.Music.Classes
|
|||||||
if (video == null) // do something with this error
|
if (video == null) // do something with this error
|
||||||
throw new Exception("Could not load any video elements based on the query.");
|
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;
|
int gotoTime = 0;
|
||||||
if (m.Captures.Count > 0)
|
if (m.Captures.Count > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user