Introduces `TvMediaDetailScaffold` to standardize the layout of Movie, Series, and Episode detail screens. This refactor implements a consistent two-column header design featuring a hero section on the left and an overview panel on the right, supported by a new horizontal and vertical gradient overlay system.
Key changes:
- Created `TvMediaDetailScaffold`, `MediaDetailHeaderRow`, and `MediaDetailSectionTitle` common components.
- Extracted screen-specific hero and overview logic into internal components for `MovieScreen`, `SeriesScreen`, and `EpisodeScreen`.
- Standardized typography, spacing, and focus management across all detail views.
- Added comprehensive UI tests for Movie, Series, and Episode content screens.
- Improved the "Up Next" and "Library Status" visibility on the Series detail page.
- Upgrade Gradle wrapper to 9.3.1.
- Update Android Gradle Plugin (AGP) to 9.1.0 and Kotlin to 2.2.10.
- Update Hilt to 2.57.2, Room to 2.7.0, and KSP to 2.3.2.
- Configure Gradle Java toolchain using JetBrains JDK 21 and the Foojay resolver plugin.
- Define several Android build feature flags and compatibility properties in `gradle.properties`.
Automatically manages downloaded episodes per series — keeps 5 unwatched
episodes downloaded, removing watched ones and fetching new ones on
HomeScreen open or pull-to-refresh. A single download button on the
Series screen opens a dialog to choose between downloading all episodes
or enabling smart download.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire up the existing download button on the Series screen to download
all episodes, and add a per-season download button next to the season
tabs. Episode metadata is fetched in parallel for faster queuing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of just popping the EpisodeRoute (which could land on Home if
opened from ContinueWatching), pop and push a SeriesRoute so playback
exit consistently returns to the SeriesScreen.
Pop the EpisodeRoute from the navigation stack when playback starts,
so finishing PlayerActivity returns to the SeriesScreen instead of
the EpisodeScreen.
Wrap HomeContent with PullToRefreshBox to allow refreshing library,
continue watching, and next up sections by pulling down. Also fix
refreshHomeData to suspend until loading completes so the refresh
indicator dismisses properly.
Adds a MediaResumeButton to the Series screen action bar that directly
launches playback for the next unwatched episode. Shows "Resume" with
progress fill if partially watched, or "Play" for unwatched episodes.
Store the movie/episode title as UTF-8 bytes in DownloadRequest.data
when building each download request. PurefinDownloadService reads it
back in getForegroundNotification() so the notification shows the
actual title (e.g. "Inception") instead of the generic "Downloading".
For multiple simultaneous downloads the existing "Downloading N files"
text is kept. The title is persisted by Media3 alongside the request,
so it survives app restarts.
EpisodeScreen called viewModel.onDownloadClick() directly without first
requesting the POST_NOTIFICATIONS runtime permission. On Android 13+
(API 33+), foreground service notifications are suppressed without this
permission, so downloads ran silently with no notification shown.
Mirrors the existing permission pattern from MovieScreen: on Android 13+
the system dialog is shown before the first download; on denial the
download still proceeds (notification is nice-to-have).
- Add ActiveDownloadItem data class to represent a download in progress
- Add observeActiveDownloads() to MediaDownloadManager, polling the Media3
download index every 500ms on Dispatchers.IO for reliable real-time progress
(listener callbacks alone do not fire on every progress update)
- DownloadsViewModel exposes activeDownloads (StateFlow) and cancelDownload();
the completed downloads flow filters out items currently in progress
- DownloadsContent shows a "Downloading" section with thumbnail, title,
progress bar + percentage, and a cancel button above the completed grid