Repository navigation
feat(series): support user-created custom shows and episode ordering - #166
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideSchema and migrationsDefine the custom-series tables and Room v10 migration, register the entities and DAO, and wire the repository into dependency injection.
Data structuresReview the video model defaults and the custom-series DAO and repository contracts used by the scanner and UI.
ImplementationCheck how custom items are excluded from automatic grouping and converted into series, episodes, and continue-watching entries.
Verify the compact timecode calculation for inverted-duration display.
UIReview the builder flow for creating and editing custom series, selecting videos, editing episode numbers, and reordering episodes.
Check custom-series edit and deletion behavior in the series detail screen, including preservation of underlying files.
Review the Shows entry points and empty-state action for creating a custom series.
Check selection-mode actions and add-to-series dialog wiring in the Files and Folders browsers.
Review the user-facing labels and guidance for custom-series actions and screens.
DocumentationRead the changelog entry describing custom-series creation, entry points, detail integration, and scanner exclusion.
TestsCheck the custom-series tests for identifier format, claimed-file exclusion, episode mapping, and reorder behavior.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f61b96887
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| val seasonsMap = customEpisodes | ||
| .groupBy { it.seasonNumber } | ||
| .mapValues { (_, eps) -> | ||
| eps.sortedWith(compareBy({ it.seasonNumber }, { it.episodeNumber }, { it.video.displayName })) |
There was a problem hiding this comment.
When a user drags episodes within the same season without renumbering them, the builder saves the new position, but this sort discards it. The detail screen and next-to-watch sequence therefore revert to episode-number order; use the saved position or renumber episodes on drag.
Useful? React with 👍 / 👎.
| val clickEvent = LocalPlayerButtonsClickEvent.current | ||
| val interactionSource = remember { MutableInteractionSource() } | ||
| val currentText = Utils.prettyTime(position.toInt(), false) | ||
| val totalText = Utils.prettyTime(duration.toInt(), isInverted) |
There was a problem hiding this comment.
Compute remaining time from the playhead
When invertDuration is enabled, the existing duration timer formats position - duration to show time remaining. Passing only duration here cannot show the remaining time, so Cinema's timecode no longer honors that preference; format the inverted value from position - duration.
AGENTS.md reference: AGENTS.md:L100-L101
Useful? React with 👍 / 👎.
|
|
||
| val customEpisodes = seriesItems.mapIndexed { idx, item -> | ||
| val video = videoByPath[item.filePath] | ||
| ?: videoByName[item.fileName] |
There was a problem hiding this comment.
Avoid resolving missing episodes by ambiguous basename
If a custom episode's path is absent from the current library index and another scanned video has the same filename (for example, 01.mkv in different season folders), this fallback can silently associate the episode with that other video. Only use the basename fallback when it identifies a unique video; otherwise retain the stored path.
Useful? React with 👍 / 👎.
Fix 4 distinct Kotlin compiler errors in CI: - Video data class: add default argument values so callers constructing Video instances without media-store attributes compile cleanly - SeriesDetector: pass fallback uri and displayName when synthesizing fallback Video instances - CustomSeriesBuilderScreen: replace obsolete cafe.adriel.voyager Screen import with app.aryan447.mpvium.presentation.Screen, resolving Screen type mismatches in callers - VideoPickerSheet: resolve videos from MediaFileRepository bucket query and library items instead of nonexistent VideoFolder.videos - SeriesGridScreen: pass onCreateSeries callback to SeriesGridContent to fix unresolved backstack reference in empty-state action Method: unmeasured; fixes compilation errors from PR #166
- Add custom_series and custom_series_item Room v10 tables with MIGRATION_9_10 - Exclude claimed custom series videos from scanner grouping to avoid duplicate entries - Provide 'Add to series…' in Folders/Files selection mode and 'Create series' in Shows - Add CustomSeriesBuilderScreen with drag-reorder, explicit season/episodes, and poster picker - Render custom series in SeriesDetailScreen with Edit and non-destructive Delete grouping - Add unit tests in CustomSeriesTest and update CHANGELOG.md
Fix 4 distinct Kotlin compiler errors in CI: - Video data class: add default argument values so callers constructing Video instances without media-store attributes compile cleanly - SeriesDetector: pass fallback uri and displayName when synthesizing fallback Video instances - CustomSeriesBuilderScreen: replace obsolete cafe.adriel.voyager Screen import with app.aryan447.mpvium.presentation.Screen, resolving Screen type mismatches in callers - VideoPickerSheet: resolve videos from MediaFileRepository bucket query and library items instead of nonexistent VideoFolder.videos - SeriesGridScreen: pass onCreateSeries callback to SeriesGridContent to fix unresolved backstack reference in empty-state action Method: unmeasured; fixes compilation errors from PR #166
- Honor saved episode position by preserving custom episode order within seasons - Avoid ambiguous basename resolution by filtering only unique display names - Compute inverted duration in CompactTimecode from position - duration Method: unmeasured; fixes review feedback from Codex
03c1607 to
1eb85de
Compare
Summary
Before / After
Verification
git diff --checkCustomSeriesTestCHANGELOG.mdUnreleased entrySummary by Sourcery
Support user-curated TV series built from existing videos while integrating them into library browsing and playback workflows.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests: