[42] add conditional sorts to streaming (#2233)

This commit is contained in:
YozoraXCII 2024-09-21 11:24:58 +01:00 committed by GitHub Action
parent 27e58d6394
commit 97224e27bd
4 changed files with 36 additions and 3 deletions

View file

@ -1 +1 @@
2.0.2-build41
2.0.2-build42

View file

@ -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: <<discover_limit>>
with_watch_providers: <<discover_with>>
watch_region: <<discover_region>>
sort_by: primary_release_date.desc
sort_by: <<discover_sort>>
collections:

View file

@ -64,6 +64,12 @@ templates:
- <<allowed_streaming>>
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: <<discover_limit>>
with_watch_providers: <<discover_with>>
watch_region: <<discover_region>>
sort_by: primary_release_date.desc
sort_by: <<discover_sort>>
overlays:

View file

@ -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.<br>**Type:** Integer<br>**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.<br>**Type:** Integer<br>**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 } |