Skip to content

fix: normalize genre labels to proper case - #183

Merged
ProdigyV21 merged 2 commits into
ProdigyV21:mainfrom
EierKopZA:fix/normalize-genre-title-casing
May 14, 2026
Merged

fix: normalize genre labels to proper case#183
ProdigyV21 merged 2 commits into
ProdigyV21:mainfrom
EierKopZA:fix/normalize-genre-title-casing

Conversation

@EierKopZA

Copy link
Copy Markdown
Contributor

Normalize genre labels to proper case across details and live TV surfaces by replacing uppercase rendering with a shared formatter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 12, 2026 08:11

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

Normalizes genre label display across the Details screen and Live TV UI by replacing all-uppercase rendering with a shared “proper case” formatter.

Changes:

  • Added formatGenreName(...) in MediaBadges.kt to title-case genre strings while preserving “TV”.
  • Updated Live TV search overlay and mini player to render genres via formatGenreName.
  • Updated Details screen GenreBadge to render genres via formatGenreName.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
app/src/main/kotlin/com/arflix/tv/util/MediaBadges.kt Introduces shared genre formatting utility used by UI surfaces.
app/src/main/kotlin/com/arflix/tv/ui/screens/tv/live/SearchOverlay.kt Switches genre label rendering from uppercase() to shared formatter.
app/src/main/kotlin/com/arflix/tv/ui/screens/tv/live/MiniPlayer.kt Switches genre label rendering from uppercase() to shared formatter.
app/src/main/kotlin/com/arflix/tv/ui/screens/details/DetailsScreen.kt Switches Details genre badge rendering from uppercase() to shared formatter.

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

Comment on lines +31 to +34
if (trimmed.isEmpty()) return trimmed
val titled = trimmed.lowercase().replace(genreWordStartRegex) { match ->
match.groupValues[1] + match.groupValues[2].replaceFirstChar { it.titlecase() }
}

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

@EierKopZA

Copy link
Copy Markdown
Contributor Author

@ProdigyV21 - I tested this and it didn't seem to fix the labels. It's still all caps before the Fantasy genre.

Do you want me to close this PR or do you want to fix it? Probably just a minor change required.

@ProdigyV21

Copy link
Copy Markdown
Owner

You can try to fix it yourself maybe? If you get stuck I can take a look

@ProdigyV21
ProdigyV21 merged commit 83f9854 into ProdigyV21:main May 14, 2026
1 check passed
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.

3 participants