Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RT ratings for all TVShows returns 404 #3491

Closed
1 task done
Fallenbagel opened this issue Jun 10, 2023 · 1 comment · Fixed by #3492
Closed
1 task done

RT ratings for all TVShows returns 404 #3491

Fallenbagel opened this issue Jun 10, 2023 · 1 comment · Fixed by #3492

Comments

@Fallenbagel
Copy link
Contributor

Description

RT ratings for movies works well. All TVShows, however, returns as 404 RT ratings not found, despite, the returned contentResults consisting that tv show.

For example: There are no RT rating scores returned for The Flash (2014)
From my debugging it seems that:

let tvshow: RTAlgoliaHit | undefined = contentResults.hits[0];

does returns the tv show as:

{
  emsId: '55a8d901-ea76-3749-9cb5-1194baa0c153',
  tmsId: 'SH019229360000',
  rtId: 3105,
  type: 'tv',
  title: 'The Flash',
  titles: [ 'The Flash' ],
  vanity: 'the_flash',
  description: 'When a freak accident grants CSI Barry Allen superspeed, he uses the power to solve crimes.',
  releaseYear: 2014,
  seriesPremiere: '2014-10-07',
  rating: 'TVPG',
  genres: [ 'Drama', 'Action', 'Adventure', 'Fantasy' ],
  posterImageUrl: 'https://flxt.tmsimg.com/assets/p10781465_b_v12_az.jpg',
  rottenTomatoes: {
    audienceScore: 60,
    criticsIconUrl: 'https://content6.flixster.com/static/images/rt-icons/fresh.png',
    audienceIconUrl: 'https://content6.flixster.com/static/images/rt-icons/red_popcorn.png',
    criticsScore: 89
  },
  castCrew: {
    cast: [
      'Grant Gustin',
      'Candice Patton',
      'Danielle Panabaker',
      'Danielle Nicolet',
      'Kayla Compton'
    ],
    crew: { 'Executive Producer': [Array] }
  },
  cast: [
    {
      role: 'Actor',
      emsId: 'e8e57646-1b72-3008-9cb4-70e98887fe84',
      name: 'Grant Gustin',
      personId: '646895'
    },
    {
      role: 'Actor',
      emsId: 'b0904484-81f9-3dfc-bd71-7a2fb4baf6b6',
      name: 'Candice Patton',
      personId: '558807'
    },
    {
      role: 'Actor',
      emsId: 'e68ce8bb-e077-3196-b009-41368891c973',
      name: 'Danielle Panabaker',
      personId: '310751'
    },
    {
      role: 'Actor',
      emsId: '8825fbde-f59e-39d1-8ebe-3cc70c38e490',
      name: 'Danielle Nicolet',
      personId: '201347'
    },
    {
      role: 'Actor',
      emsId: '06e0c766-74b8-3233-9905-617459a04b98',
      name: 'Kayla Compton',
      personId: '710264'
    },
    {
      role: 'Actor',
      emsId: '11bf81a0-d4e1-352f-b13b-41586314f6be',
      name: 'Brandon McKnight',
      personId: '1197380'
    },
    {
      role: 'Actor',
      emsId: '0e2bd481-10d0-34f9-b2d5-8440108b2281',
      name: 'Jon Cor',
      personId: '532630'
    },
    {
      role: 'Actor',
      emsId: 'e2d86837-c606-3d6b-9516-08ec4978f5de',
      name: 'Jesse L. Martin',
      personId: '169843'
    },
    {
      role: 'Actor',
      emsId: '8f1583b4-4a32-326d-a9a7-bb169134d550',
      name: 'Jessica Parker Kennedy',
      personId: '498497'
    },
    {
      role: 'Actor',
      emsId: 'a3756c02-14f8-3724-bc89-97b1627c1e79',
      name: 'Chris Klein',
      personId: '166858'
    },
    {
      role: 'Actor',
      emsId: 'c103ffa0-729d-3d8c-9080-242a7eb8829f',
      name: 'Tom Felton',
      personId: '171726'
    },
    {
      role: 'Actor',
      emsId: '3c2a6019-5d39-3d8f-a71a-9913c6573cb8',
      name: 'Carlos Valdes',
      personId: '705104'
    },
    {
      role: 'Actor',
      emsId: '8f3d7ea7-a651-3bdc-8606-a5110effea80',
      name: 'Tom Cavanagh',
      personId: '80683'
    },
    {
      role: 'Actor',
      emsId: '19b14d82-7521-315e-ae6f-84b8614fdee6',
      name: 'Hartley Sawyer',
      personId: '594858'
    },
    {
      role: 'Actor',
      emsId: '91f4916b-5aef-33ba-85cd-601e66520541',
      name: 'Keiynan Lonsdale',
      personId: '861232'
    },
    {
      role: 'Actor',
      emsId: 'ae719003-42fc-37fb-831a-b9303b566f75',
      name: 'Rick Cosnett',
      personId: '740745'
    }
  ],
  crew: [
    {
      role: 'Executive Producer',
      emsId: 'dd6ff302-b903-3ada-9d0a-28da926e28ef',
      name: 'Greg Berlanti',
      personId: '189508'
    },
    {
      role: 'Executive Producer',
      emsId: 'a53106de-8fc7-3769-b64c-e5e959c86b52',
      name: 'Sarah Schechter',
      personId: '785112'
    },
    {
      role: 'Executive Producer',
      emsId: '47b6cb82-ee5a-38e1-8910-443544162010',
      name: 'Eric Wallace',
      personId: '436583'
    },
    {
      role: 'Executive Producer',
      emsId: '342f8bc1-019c-3223-b134-2de34c661d33',
      name: 'Sam Chalsen',
      personId: '1096201'
    },
    {
      role: 'Executive Producer',
      emsId: '8ea705cc-663e-3b71-a7b3-5a74efd12dc1',
      name: 'Jonathan Butler',
      personId: '981908'
    }
  ],
  seasons: [
    2023, 2021, 2021,
    2019, 2018, 2017,
    2016, 2015, 2014
  ],
  pageViews_popularity: 48754,
  typeId: 2,
  promotion: 0,
  updateDate: '2023-06-10T00:34:01.474Z',
  isEmsSearchable: 1,
  objectID: '55a8d901-ea76-3749-9cb5-1194baa0c153',
  _highlightResult: {
    title: {
      value: '<em>The</em> <em>Flash</em>',
      matchLevel: 'full',
      fullyHighlighted: true,
      matchedWords: [Array]
    },
    genres: [ [Object], [Object], [Object], [Object] ],
    castCrew: { cast: [Array] }
  }
}

However, when the year is compared to the releaseYear returned:

if (year) {
        tvshow = contentResults.hits.find(
          (series) => series.releaseYear === year.toString
        );
      }

this returns as undefined.

Version

develop

Steps to Reproduce

  1. Go to any tv show (example: The flash)
  2. Observe no RT ratings returned in both ui and dev tools

Screenshots

image
image

Logs

No response

Platform

desktop

Device

all devices

Operating System

all operating systems

Browser

all browser

Additional Context

I could provide a PR for a fix of this issue as I am running a local version that fixes this issue.

Code of Conduct

  • I agree to follow Overseerr's Code of Conduct
Fallenbagel added a commit to Fallenbagel/overseerr that referenced this issue Jun 10, 2023
The releaseYear that RTAlgolia returns in the contentResults is of type=number. This messes up the
TVshow RTratings as even though the TVShow was found in the contentResults when the year is
compared, it returns `undefined` thus throwing 404 RT ratings not found. This fix fixes this issue
by treating the releaseYear as a number type.

fix sct#3491
@sct sct closed this as completed in #3492 Jun 11, 2023
sct pushed a commit that referenced this issue Jun 11, 2023
@github-actions
Copy link

🎉 This issue has been resolved in version 1.33.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

lenaxia pushed a commit to lenaxia/overseerr-oidc that referenced this issue Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant