Skip to content

Commit

Permalink
[42] add conditional sorts to streaming (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
YozoraXCII authored and actions-user committed Sep 21, 2024
1 parent 27e58d6 commit 97224e2
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.2-build41
2.0.2-build42
8 changes: 7 additions & 1 deletion defaults/both/streaming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 7 additions & 1 deletion defaults/overlays/streaming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down
21 changes: 21 additions & 0 deletions docs/files/builders/tmdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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 } |
Expand Down

0 comments on commit 97224e2

Please sign in to comment.