Fallenbagel / jellyseerr

Fork of overseerr for jellyfin support
MIT License
3.15k stars 197 forks source link

TMDB recommendations have duplicates #405

Open marcofaggian opened 1 year ago

marcofaggian commented 1 year ago

Description

The last element of the first movie recommendations' page is the same of the next pagination. Root cause is the TMDB API's response.

There are two ways to solve this:

  1. return a page of 19 from the backend (there's no way to check with previous page, without caching or network calls),
  2. (if found to be the same) skip the first element of the next page whilst stitching together the pages in the frontend.

Both have pros and cons, I'd implement a PR for the second one.

Version

1.4.1

Steps to Reproduce

Fetch the recommendations API for a TMDB movie, look at the last recommendation of the first page. It's identical to the first recommendation of the second page.

Screenshots

immagine

Logs

No response

Platform

desktop

Device

not relevant

Operating System

not relevant

Browser

not relevant

Additional Context

No response

Code of Conduct

marcofaggian commented 1 year ago

This seems to be the issue upstream, seems it has been there for a while.

Fallenbagel commented 1 year ago

~I'm a bit confused from the screenshot. What's duplicated there?~ EDIT: just saw

Fallenbagel commented 1 year ago

~It only happens in the recommendation page and desktop?~ Edit: sorry I just checked out the upstream issue. So it only happens in recommendations. I just checked it out. Movies/tvshows both are affected.

2nd choice sound like a good solution what do you think?

marcofaggian commented 1 year ago

~It only happens in the recommendation page and desktop?~ Edit: sorry I just checked out the upstream issue. 2nd choice sound like a good solution what do you think?

also for TVshows, yes Same, I can work on that

marcofaggian commented 1 year ago

@Fallenbagel Should I open a PR in the upstream overseerr project?