1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

New: TVDB ID filter when getting series from API

Closes #2486
This commit is contained in:
Mark McDowall
2019-05-12 16:14:56 -07:00
parent 98b1a7681b
commit 068eb33bf6
2 changed files with 23 additions and 1 deletions
@@ -54,5 +54,17 @@ namespace Sonarr.Http.Extensions
return defaultValue;
}
public static int GetIntegerQueryParameter(this Request request, string parameter, int defaultValue = 0)
{
var parameterValue = request.Query[parameter];
if (parameterValue.HasValue)
{
return int.Parse(parameterValue.Value);
}
return defaultValue;
}
}
}