Merge pull request #341 from Sl1MBoy/bugfix-discover-tv

bugfix(DiscoverTv):Remove unnecessary parameter clearing from DiscoverTv
This commit is contained in:
Michael Bisbjerg 2020-08-16 20:34:47 +02:00 committed by GitHub
commit 1fea813399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,19 +17,6 @@ namespace TMDbLib.Objects.Discover
}
private void ClearAirDate()
{
Parameters.Remove("air_date.gte");
Parameters.Remove("air_date.lte");
}
private void ClearFirstAirDate()
{
Parameters.Remove("first_air_date.gte");
Parameters.Remove("first_air_date.lte");
Parameters.Remove("first_air_date_year");
}
/// <summary>
/// Available options are vote_average.desc, vote_average.asc, first_air_date.desc, first_air_date.asc, popularity.desc, popularity.asc
/// </summary>
@ -53,8 +40,6 @@ namespace TMDbLib.Objects.Discover
/// </summary>
public DiscoverTv WhereAirDateIsAfter(DateTime date)
{
ClearAirDate();
Parameters["air_date.gte"] = date.ToString("yyyy-MM-dd");
return this;
}
@ -64,8 +49,6 @@ namespace TMDbLib.Objects.Discover
/// </summary>
public DiscoverTv WhereAirDateIsBefore(DateTime date)
{
ClearAirDate();
Parameters["air_date.lte"] = date.ToString("yyyy-MM-dd");
return this;
}
@ -75,8 +58,6 @@ namespace TMDbLib.Objects.Discover
/// </summary>
public DiscoverTv WhereFirstAirDateIsAfter(DateTime date)
{
ClearFirstAirDate();
Parameters["first_air_date.gte"] = date.ToString("yyyy-MM-dd");
return this;
}
@ -86,8 +67,6 @@ namespace TMDbLib.Objects.Discover
/// </summary>
public DiscoverTv WhereFirstAirDateIsBefore(DateTime date)
{
ClearFirstAirDate();
Parameters["first_air_date.lte"] = date.ToString("yyyy-MM-dd");
return this;
}
@ -97,8 +76,6 @@ namespace TMDbLib.Objects.Discover
/// </summary>
public DiscoverTv WhereFirstAirDateIsInYear(int year)
{
ClearFirstAirDate();
Parameters["first_air_date_year"] = year.ToString("0000");
return this;
}