Skip to content

fix: “Continue watching” does not display titles with the updated language - #518

Merged
ProdigyV21 merged 23 commits into
ProdigyV21:mainfrom
Aaronnn17:seguir-viendo-v2
Sep 4, 2026
Merged

fix: “Continue watching” does not display titles with the updated language#518
ProdigyV21 merged 23 commits into
ProdigyV21:mainfrom
Aaronnn17:seguir-viendo-v2

Conversation

@Aaronnn17

Copy link
Copy Markdown
Contributor

I'm reopening the pull request because I was creating the previous one from my “main” branch and didn't realize it. I'm reopening this one from another appropriate branch.

I think I've fixed the issues you mentioned earlier, and I've tested it in Android Studio to make sure it doesn't crash during compilation.

Please forgive me for any other errors—I'm a total beginner at programming, and these are the first mini-projects I've ever done!

Copy link
Copy Markdown
Owner

Thanks for reopening this and addressing the earlier feedback. The PR now compiles, covers both Trakt and fallback items, and limits processing to 50 rows, so it is much closer.

I found two remaining issues before merge:

  1. Launcher refresh is still too expensive. The final selectedItems.map calls full getMovieDetails() / getTvDetails() for every item and getSeasonEpisodes() for every TV episode, sequentially. These methods also do unrelated IMDb-rating and watched-state work. Because launcher refresh is called from several playback/history actions, this can generate many requests and make launcher updates slow. Please use lightweight TMDB calls that fetch only the localized title/episode title, with bounded concurrency and a small language-aware cache.

  2. A language change may still keep the old title. MediaRepository caches details using only the media ID, not the language, and changing contentLanguage does not invalidate those caches. setContentLanguage() also does not refresh the launcher rows. Please make these title caches language-aware (or clear them when language changes) and call launcherContinueWatchingRepository.refreshForCurrentProfile() after changing the language.

Minor cleanup: git diff --check reports trailing whitespace on lines 103 and 173.

The exact merge into current main is clean, GitHub Build Check passes, and both Play/Sideload compiles and unit-test suites pass. The idea is useful; fixing the two points above should make it reliable and safe to merge.

Removed unnecessary whitespace and improved code formatting.
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Sep 2, 2026
Added LruCache for caching titles in LauncherContinueWatchingRepository.
Refactor title and episode title resolution to use caching and limit concurrent network calls.
Added lightweight functions to retrieve movie and TV show titles without heavy processing.
Added a call to refresh the Launcher 'Keep watching' feature after updating the content language.
Refactor loadContinueWatchingCache to be a suspend function and enhance item localization.
Added localization for titles in continue watching items using a semaphore for concurrency control.
Refactor continue watching logic to use coroutines for fetching localized titles and episode titles concurrently.
Refactor continue watching logic to use translated items instead of fresh items. Update item titles and episode titles using coroutine for better performance.
@Aaronnn17

Copy link
Copy Markdown
Contributor Author

Hello again! After a few changes and tests, I think it's working as it should now. I've attached some screenshots showing the language switching between Spanish, Italian, French, and English—all in a matter of seconds.

image image image image

(Obviously, it only translates the titles that have been translated!)

@ProdigyV21
ProdigyV21 merged commit 6a4277a into ProdigyV21:main Sep 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants