Skip to content

feat: TMDB collections in Details (rebased) - #143

Merged
ProdigyV21 merged 5 commits into
ProdigyV21:mainfrom
EierKopZA:mr-79-clean
May 6, 2026
Merged

feat: TMDB collections in Details (rebased)#143
ProdigyV21 merged 5 commits into
ProdigyV21:mainfrom
EierKopZA:mr-79-clean

Conversation

@EierKopZA

@EierKopZA EierKopZA commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Recreated from GitLab MR #79 and rebased onto current main.

This PR adds TMDB movie collection support on the Details page and includes the collection routing/UX fixes needed for a clean merge.

Included Changes

  • Add TMDB collection data loading for movie details
  • Show collection section on Details page
  • Move collection items above "More Like This"
  • Fix duplicate collection naming
  • Fix hasCollection declaration scope
  • Route View Collection to CollectionDetails using collectionId

Why

The original GitLab MR was never merged. This recreates the intended feature/fixes on top of current GitHub main.

Validation

  • git diff --check against upstream/main...mr-79-clean: clean
  • Compile checks attempted in this dev container but blocked by missing Android build-tools dependency (25.0.2):
    • :app:compilePlayDebugKotlin
    • :app:compileSideloadDebugKotlin

Please run compile checks in CI or local Android SDK.

Copilot AI review requested due to automatic review settings May 5, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds TMDB collection/franchise support to the Details experience so movie detail pages can surface collection metadata, related titles, and a route into the app’s collection flow.

Changes:

  • Extend TMDB/detail data loading to fetch a movie’s belongs_to_collection reference and collection items.
  • Add Details UI support for collection sections, focus/navigation handling, and a new “View Collection” action.
  • Wire Details navigation into the existing collection-details destination.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
app/src/main/res/values/strings.xml Adds the new collection button label.
app/src/main/kotlin/com/arflix/tv/ui/screens/details/DetailsViewModel.kt Stores TMDB collection metadata and items in details UI state.
app/src/main/kotlin/com/arflix/tv/ui/screens/details/DetailsScreen.kt Adds collection UI, focus logic, button handling, and collection-item navigation.
app/src/main/kotlin/com/arflix/tv/navigation/AppNavigation.kt Passes collection navigation from Details into app navigation.
app/src/main/kotlin/com/arflix/tv/data/repository/MediaRepository.kt Adds repository helpers for TMDB collection lookup and item loading.
app/src/main/kotlin/com/arflix/tv/data/api/TmdbApi.kt Extends TMDB movie details models with collection reference data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +758 to +761
val collectionId = uiState.collectionId
if (collectionId != null) {
onNavigateToCollection(collectionId.toString())
}
Comment on lines +1956 to +1963
if (collectionItems.isNotEmpty()) {
Box(modifier = Modifier.clickable { onButtonClick(5) }) {
PremiumActionButton(
icon = Icons.Default.Star,
text = stringResource(R.string.view_collection),
isFocused = focusSectionForUi == FocusSection.BUTTONS && buttonIndex == 5,
isIconOnly = true
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

when (section) {
FocusSection.BUTTONS -> if (buttonIdx < 4) setButton(buttonIdx + 1)
FocusSection.BUTTONS -> {
val maxButton = if (uiState.collectionId != null) 5 else 4
Comment on lines +2012 to +2014
collectionItems: List<MediaItem> = emptyList(),
collectionName: String? = null,
collectionIndex: Int = 0,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Comment on lines +212 to 213
var collectionIndex by remember { mutableIntStateOf(0) }
var suppressSelectUntilMs by remember { mutableLongStateOf(0L) }
Comment thread app/src/main/kotlin/com/arflix/tv/ui/screens/details/DetailsScreen.kt Outdated
Column {
val displayName = collectionName ?: stringResource(R.string.more_like_this)
Text(
text = "$displayName Collection",
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ProdigyV21

Copy link
Copy Markdown
Owner

Not ready to merge yet. This still conflicts with GitHub main in DetailsScreen.kt, so it needs a rebase/manual conflict resolution first.

Also the View Collection fix still looks wrong: it passes the raw TMDB collection id into CollectionDetailsScreen, but that screen loads from CatalogRepository by catalog id. That will likely show “Collection not found” for TMDB franchise ids. Please add a real TMDB collection route/screen mode, or adapt CollectionDetailsScreen to load TMDB collection ids directly.

…collections

# Conflicts:
#	app/src/main/kotlin/com/arflix/tv/ui/screens/details/DetailsScreen.kt
@ProdigyV21
ProdigyV21 merged commit cad9596 into ProdigyV21:main May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants