From 97224e27bdbb3ec699ffb1a3bba18c1693c2b1af Mon Sep 17 00:00:00 2001 From: YozoraXCII <96386153+YozoraXCII@users.noreply.github.com> Date: Sat, 21 Sep 2024 11:24:58 +0100 Subject: [PATCH] [42] add conditional sorts to streaming (#2233) --- VERSION | 2 +- defaults/both/streaming.yml | 8 +++++++- defaults/overlays/streaming.yml | 8 +++++++- docs/files/builders/tmdb.md | 21 +++++++++++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index edcef170..00df4bc1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.2-build41 +2.0.2-build42 diff --git a/defaults/both/streaming.yml b/defaults/both/streaming.yml index d7ff546f..90c9632c 100644 --- a/defaults/both/streaming.yml +++ b/defaults/both/streaming.yml @@ -18,6 +18,12 @@ templates: - allowed_libraries - originals_only conditionals: + discover_sort: + conditions: + - library_type: movie + value: primary_release_date.desc + - library_type: show + value: first_air_date.desc originals: conditions: - originals_only: true @@ -74,7 +80,7 @@ templates: limit: <> with_watch_providers: <> watch_region: <> - sort_by: primary_release_date.desc + sort_by: <> collections: diff --git a/defaults/overlays/streaming.yml b/defaults/overlays/streaming.yml index 687ea9ea..42037423 100644 --- a/defaults/overlays/streaming.yml +++ b/defaults/overlays/streaming.yml @@ -64,6 +64,12 @@ templates: - <> ignore_blank_results: true conditionals: + discover_sort: + conditions: + - library_type: movie + value: primary_release_date.desc + - library_type: show + value: first_air_date.desc originals: conditions: - originals_only: true @@ -105,7 +111,7 @@ templates: limit: <> with_watch_providers: <> watch_region: <> - sort_by: primary_release_date.desc + sort_by: <> overlays: diff --git a/docs/files/builders/tmdb.md b/docs/files/builders/tmdb.md index 8010352c..672b4adb 100644 --- a/docs/files/builders/tmdb.md +++ b/docs/files/builders/tmdb.md @@ -466,6 +466,12 @@ and in a specific order. Note that a number of filters support being comma (,) or pipe (|) separated. Comma's are treated like an AND query while pipe's are treated like an OR. This allows for quite complex filtering depending on your desired results. +!!!bug + + We have noticed inconsistent responses from TMDb when using `popularity.asc` and `popularity.desc` as the sort order. This can result in movies/shows disappearing from and reapparing in collections/overlays sporadically. **We suggest users do not use the popularity sort options with `tmdb_discover`**. + + This bug is on TMDb's side and we are awaiting a fix from them. + | Movie Parameters | Description | |:--------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `limit` | Specify how many movies you want returned by the query.
**Type:** Integer
**Default:** 100 | @@ -512,6 +518,12 @@ and in a specific order. Note that a number of filters support being comma (,) or pipe (|) separated. Comma's are treated like an AND query while pipe's are treated like an OR. This allows for quite complex filtering depending on your desired results. +!!!bug + + We have noticed inconsistent responses from TMDb when using `popularity.asc` and `popularity.desc` as the sort order. This can result in movies/shows disappearing from and reapparing in collections/overlays sporadically. **We suggest users do not use the popularity sort options with `tmdb_discover`**. + + This bug is on TMDb's side and we are awaiting a fix from them. + | Show Parameters | Description | |:--------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `limit` | Specify how many movies you want to be returned by the query.
**Type:** Integer
**Default:** 100 | @@ -547,6 +559,15 @@ and in a specific order. ### Sort Options +!!!bug + + We have noticed inconsistent responses from TMDb when using `popularity.asc` and `popularity.desc` as the sort order. This can result in movies/shows disappearing from and reapparing in collections/overlays sporadically. + + **Due to the nature of this bug, we suggest you do not use the popularity sort options with `tmdb_discover` unless you also set a `limit` of 20 or less**. If you do not set a limit, the data that TMDb returns may be inconsistent.** + + This bug is on TMDb's side that we have made them aware of and are currently awaiting a fix. + + | Sort Option | Movie Sort | Show Sort | |:----------------------------|:------------------------------------------:|:------------------------------------------:| | `popularity.asc` | :fontawesome-solid-circle-check:{ .green } | :fontawesome-solid-circle-check:{ .green } |