Divinelink / scenepeek-android

ScenePeek is an Android Application that provides information about movies, television shows & persons using the TMDB API.
0 stars 0 forks source link

[Person] Known for section and caching #63

Closed Divinelink closed 3 months ago

Divinelink commented 3 months ago

In this pull request, we leverage the combined-credits API to fetch and display movie and tv credits for a person. As always we use SQLDelight to store on our database the fetched credits, therefore reducing unnecessary calls when the user re-enters the same person screen.

We've added a "Known For" section that showcases movies and TV shows based on each person's "known for department" property. For example, if someone is known for acting, the section highlights their acting credits. If they're known for directing, it focuses on their directing credits, and so on.

We've implemented a custom algorithm to calculate the "known for" section for each person. Since this isn't provided directly by the API, we developed a tailored solution that factors in several API metrics: popularity, order of importance (for movies), total episodes (for TV series), and vote count. While it's not a perfect match to the original TheMovieDB, it's the closest and best solution available, given that the original "known for" section uses data not accessible through this API.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 86.95055% with 95 lines in your changes missing coverage. Please review.

Project coverage is 70.37%. Comparing base (a589a20) to head (5b6dfd5).

Files Patch % Lines
...n/com/andreolas/movierama/home/ui/FlatMediaList.kt 18.75% 13 Missing :warning:
...inelink/feature/details/media/ui/DetailsContent.kt 0.00% 13 Missing :warning:
...tlin/com/andreolas/movierama/home/ui/HomeScreen.kt 40.00% 8 Missing and 1 partial :warning:
...son/credits/mapper/PersonCastCreditEntityMapper.kt 76.92% 0 Missing and 9 partials :warning:
...son/credits/mapper/PersonCrewCreditEntityMapper.kt 82.05% 0 Missing and 7 partials :warning:
...domain/details/person/FetchPersonDetailsUseCase.kt 91.17% 1 Missing and 5 partials :warning:
...otlin/com/divinelink/core/model/media/MediaItem.kt 16.66% 5 Missing :warning:
...earch/multi/mapper/MultiSearchResponseApiMapper.kt 0.00% 3 Missing :warning:
...eature/details/person/ui/credits/KnowForSection.kt 88.88% 2 Missing and 1 partial :warning:
...n/credits/mapper/PersonCreditsApiToEntityMapper.kt 96.55% 0 Missing and 2 partials :warning:
... and 17 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #63 +/- ## ========================================== + Coverage 68.62% 70.37% +1.75% ========================================== Files 300 319 +19 Lines 7132 7748 +616 Branches 998 1062 +64 ========================================== + Hits 4894 5453 +559 - Misses 1821 1850 +29 - Partials 417 445 +28 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.