New: (Indexer) GazelleGames

This commit is contained in:
Qstick
2021-06-19 15:48:28 -04:00
parent 9e64acd407
commit a97b801b24
2 changed files with 441 additions and 0 deletions
+15
View File
@@ -1,5 +1,7 @@
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.WebUtilities;
namespace NzbDrone.Core.Parser
{
@@ -83,5 +85,18 @@ namespace NzbDrone.Core.Parser
return "tt" + ((int)imdbid).ToString("D7");
}
public static string GetArgumentFromQueryString(string url, string argument)
{
if (url == null || argument == null)
{
return null;
}
var qsStr = url.Split(new char[] { '?' }, 2)[1];
qsStr = qsStr.Split(new char[] { '#' }, 2)[0];
var qs = QueryHelpers.ParseQuery(qsStr);
return qs[argument].FirstOrDefault();
}
}
}