1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-27 22:57:09 -04:00

Optionally include season images when fetching series from API

Closes #464
This commit is contained in:
Mark McDowall
2018-01-13 15:00:40 -08:00
parent ee673cd152
commit 245bf6c7d6
5 changed files with 48 additions and 28 deletions
@@ -1,4 +1,4 @@
using System;
using System;
using Nancy;
namespace NzbDrone.Api.Extensions
@@ -42,5 +42,17 @@ namespace NzbDrone.Api.Extensions
return request.Path.StartsWith("/MediaCover/", StringComparison.InvariantCultureIgnoreCase) ||
request.Path.StartsWith("/Content/Images/", StringComparison.InvariantCultureIgnoreCase);
}
public static bool GetBooleanQueryParameter(this Request request, string parameter, bool defaultValue = false)
{
var parameterValue = request.Query[parameter];
if (parameterValue.HasValue)
{
return bool.Parse(parameterValue.Value);
}
return defaultValue;
}
}
}