omdbapi / OMDb-API

The Open Movie Database Bug Tracking
416 stars 20 forks source link

Results are different with or without `&type=`, even when no type is actually given #285

Open Kabouik opened 1 year ago

Kabouik commented 1 year ago

For instance,

http://www.omdbapi.com/?apikey=APIKEY&s=all&page=804&type= gives:

{
  "Search": [
    {
      "Title": "All My Friends Are Dead",
      "Year": "2022",
      "imdbID": "tt23733314",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BMGI4NDg5ODctNmE5OC00YjYzLThkOGMtM2M5OGMyMzJhYzRiXkEyXkFqcGdeQXVyMTU4MzAxNDE3._V1_SX300.jpg"
    },
    {
      "Title": "Elsewhere Starts Here and It's All Happening",
      "Year": "2022",
      "imdbID": "tt23772878",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BY2FjY2U2N2ItMjc2OC00Y2JhLTkwODAtY2Y0NDBlNzlmNGFkXkEyXkFqcGdeQXVyNDY0MDE0OQ@@._V1_SX300.jpg"
    },
    {
      "Title": "The 13 Scariest Movies of All Time",
      "Year": "2019",
      "imdbID": "tt23776806",
      "Type": "movie",
      "Poster": "N/A"
    },
    {
      "Title": "Satan's Menagerie: All Hell Breaks Loose",
      "Year": "2022",
      "imdbID": "tt23874590",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BZDkxNWVjMjQtMzlmMi00MWVlLWI3NjYtOGNhOTU2ZjAyMWJhXkEyXkFqcGdeQXVyMTUyNjgxMTA0._V1_SX300.jpg"
    },
    {
      "Title": "All American",
      "Year": "2022",
      "imdbID": "tt24057028",
      "Type": "movie",
      "Poster": "N/A"
    },
    {
      "Title": "All Wigged Out: The Musical",
      "Year": "2023",
      "imdbID": "tt24163778",
      "Type": "movie",
      "Poster": "N/A"
    },
    {
      "Title": "Making 100 Friends from All Over the World",
      "Year": "2019",
      "imdbID": "tt24228506",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BZWQ1MzY4ZDEtOTI2NS00YjJhLThmYjMtYjI3YTMwOWU3MGYxXkEyXkFqcGdeQXVyMTU5ODUxMjIy._V1_SX300.jpg"
    },
    {
      "Title": "All I Want",
      "Year": "2022",
      "imdbID": "tt24240560",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BZTU4NTYyZTItZTEyNi00OTZiLWI2MjMtNDg0OWMxOTU2MWZhXkEyXkFqcGdeQXVyNjQ0NjMwNzk@._V1_SX300.jpg"
    },
    {
      "Title": "EP5: Everything Everywhere All at Once (2022)",
      "Year": "2022",
      "imdbID": "tt24457576",
      "Type": "movie",
      "Poster": "N/A"
    }
  ],
  "totalResults": "8039",
  "Response": "True"
}

Whereas http://www.omdbapi.com/?apikey=APIKEY&s=all&page=804 gives:

{
  "Search": [
    {
      "Title": "All Magic Sands/Chappaqua",
      "Year": "2013",
      "imdbID": "tt8167380",
      "Type": "movie",
      "Poster": "N/A"
    },
    {
      "Title": "DJ Flavours: Your Caress (All I Need)",
      "Year": "1999",
      "imdbID": "tt8136362",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BMzc0NmNlMTItOTI4Zi00YzZiLTkyMWUtZWMzNDkwMTgwNDI5XkEyXkFqcGdeQXVyMzM4MjM0Nzg@._V1_SX300.jpg"
    },
    {
      "Title": "One Against All",
      "Year": "2017",
      "imdbID": "tt8192768",
      "Type": "movie",
      "Poster": "N/A"
    },
    {
      "Title": "Daddy Was A Milkman: All About Love",
      "Year": "2018",
      "imdbID": "tt8202894",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BNGZiYjM3NDYtZjc1ZS00ODhhLTg3OGEtMTFlNjg3ZjhiNWE2XkEyXkFqcGdeQXVyMjk3OTg5MzE@._V1_SX300.jpg"
    },
    {
      "Title": "Chelsea All Inclusive",
      "Year": "2018",
      "imdbID": "tt8214668",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BMzk1NGI4ZjItYzdkZC00ODRmLWJjOGItMmU0ZTY4YzEyMDBlXkEyXkFqcGdeQXVyNDcwNjUxNzc@._V1_SX300.jpg"
    },
    {
      "Title": "Brawl for It All",
      "Year": "2018–",
      "imdbID": "tt8215490",
      "Type": "series",
      "Poster": "https://m.media-amazon.com/images/M/MV5BYTgyYzgxNDEtZDUyOC00Mzk0LTk5YzUtOWZhYzQ5ZGNmYjgzXkEyXkFqcGdeQXVyMjU4ODgyMzE@._V1_SX300.jpg"
    },
    {
      "Title": "All That You Love Will Be Carried Away",
      "Year": "2018",
      "imdbID": "tt8219210",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BY2Q1ZTI2Y2ItYWY1OS00NTVjLWI5YTItN2E5NTI4NmEwMDQzXkEyXkFqcGdeQXVyNjk3MjczMzQ@._V1_SX300.jpg"
    },
    {
      "Title": "It's All Over",
      "Year": "1930",
      "imdbID": "tt8219854",
      "Type": "movie",
      "Poster": "N/A"
    },
    {
      "Title": "All Fired Up",
      "Year": "2018",
      "imdbID": "tt8223476",
      "Type": "movie",
      "Poster": "https://m.media-amazon.com/images/M/MV5BNmY0NDBkMWUtMGRhMS00N2VhLTgyMGItY2E0ZGQ4ZWEyZGU0XkEyXkFqcGdeQXVyNTAzMjUyNTY@._V1_SX300.jpg"
    }
  ],
  "totalResults": "8039",
  "Response": "True"
}

Notce how the totalResults is the same in both cases, which confirms that an empty &type= does not alter the matches overall, so we would expect them to be listed in the same way. This does not happen on all pages: sometimes they stay unchanged, sometimes results of a given page are just sorted differently, and sometimes, like above, the content differs. I have not found the key to reproduce that, but would want to understand what causes the different patterns for my program.

Of course, if we actually give a type (series or movie), then totalResults changes and the content is completely different, which is expected.

safuente commented 6 months ago

Same issue "type" filter is not working ok to filter by movie or series. Same results with both values.