From 0f2da9b6260403e0abb80aed8e9ff622e53e6f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rk=20=C3=81ngy=C3=A1n?= Date: Sat, 25 Mar 2023 19:57:39 +0100 Subject: [PATCH 1/2] discover movie runtime at least, runtime at most filters --- TMDbLib/Objects/Discover/DiscoverMovie.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/TMDbLib/Objects/Discover/DiscoverMovie.cs b/TMDbLib/Objects/Discover/DiscoverMovie.cs index c1528489..5ad79a35 100644 --- a/TMDbLib/Objects/Discover/DiscoverMovie.cs +++ b/TMDbLib/Objects/Discover/DiscoverMovie.cs @@ -374,6 +374,24 @@ public DiscoverMovie WhereReleaseDateIsBefore(DateTime date) return this; } + /// + /// Only include movies that are equal to, or have a runtime higher than this value. Expected value is an integer (minutes). + /// + public DiscoverMovie WhereRuntimeIsAtLeast(int minutes) + { + Parameters["with_runtime.gte"] = minutes.ToString(); + return this; + } + + /// + /// Only include movies that are equal to, or have a runtime lower than this value. Expected value is an integer (minutes). + /// + public DiscoverMovie WhereRuntimeIsAtMost(int minutes) + { + Parameters["with_runtime.lte"] = minutes.ToString(); + return this; + } + /// /// Filter movies by their vote average and only include those that have an average rating that is equal to or higher than the specified value. Expected value is a float. /// From 10b60581eaff0097743317cd57276d099414f349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rk=20=C3=81ngy=C3=A1n?= Date: Sat, 25 Mar 2023 19:59:08 +0100 Subject: [PATCH 2/2] discover tv vote average at most, vote count at most filters --- TMDbLib/Objects/Discover/DiscoverTv.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/TMDbLib/Objects/Discover/DiscoverTv.cs b/TMDbLib/Objects/Discover/DiscoverTv.cs index f2d290c8..636913c7 100644 --- a/TMDbLib/Objects/Discover/DiscoverTv.cs +++ b/TMDbLib/Objects/Discover/DiscoverTv.cs @@ -125,6 +125,15 @@ public DiscoverTv WhereVoteAverageIsAtLeast(double score) return this; } + /// + /// Only include TV shows that are equal to, or have a lower average rating than this value. Expected value is a float. + /// + public DiscoverTv WhereVoteAverageIsAtMost(double score) + { + Parameters["vote_average.lte"] = score.ToString(); + return this; + } + /// /// Only include TV shows that are equal to, or have a vote count higher than this value. Expected value is an integer. /// @@ -134,6 +143,15 @@ public DiscoverTv WhereVoteCountIsAtLeast(int count) return this; } + /// + /// Only include TV shows that are equal to, or have a vote count lower than this value. Expected value is an integer. + /// + public DiscoverTv WhereVoteCountIsAtMost(int count) + { + Parameters["vote_count.lte"] = count.ToString(); + return this; + } + /// /// Specifies which language to use for translatable fields ///