mikevallano / tmdb-moviequeue

Add movies to your queue, share lists with family & friends. http://www.flicksonlists.com/
http://www.flicksonlists.com/
0 stars 0 forks source link

Search actor by id #380

Open lortza opened 11 months ago

lortza commented 11 months ago

This little 80s gem https://youtu.be/8cMpCr-SN7U?feature=shared is in parks & rec Brandanowitz's credits http://www.flicksonlists.com/tmdb/actor_search?actor=Paul+Schneider

And that's hilarious, but I doubt he was a director for Disney in 1988. Also, his bio is some other person. http://www.flicksonlists.com/tmdb/actor_more?actor_id=543495

I think the trouble is that we do name searches in some places instead of by id. My guess is we had the id on the parks & rec cast page, then used his name to search for movies -- got the wrong guy -- then followed that wrong id to the wrong bio.

If I recall from all of the refactor work, one does not simply fix this. We reuse the searches from different locations, for example, allowing a user to type in an actor name or arriving on that page via another credit.

mikevallano commented 11 months ago

My guess is we had the id on the parks & rec cast page, then used his name to search for movies

Yes. I just looked into it and you're right. We have the id on the cast page.

The problem with how we're handling search is we always take the first result app/services/movie_data_service.rb:130, and in some edge cases (like brandanowitz), it's gonna be wrong.

So we could link from the credits to the actor_more page, which uses the id, but it might also be good to have a search option that we could send the id so we can get the movie poster view and be sure it's the right actor.

Just making a note since I mucked with it locally, we could link to the actor_more page on app/views/tmdb/tv_season.html.erb:21 with:

<p class="actor"><%= link_to "#{truncate(actor.name, length: 18, escape: false)}", actor_more_path(actor_id: actor.actor_id)  %></p>