|
|
|
@ -54,5 +54,17 @@ namespace Readarr.Http.Extensions
|
|
|
|
|
return request.Path.StartsWith("/MediaCover/", StringComparison.InvariantCultureIgnoreCase) ||
|
|
|
|
|
request.Path.StartsWith("/Content/Images/", StringComparison.InvariantCultureIgnoreCase);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|