Group README entries by type into TV Series / Documentaries / Movies#28
Merged
andygrunwald merged 2 commits intomainfrom May 5, 2026
Merged
Group README entries by type into TV Series / Documentaries / Movies#28andygrunwald merged 2 commits intomainfrom
andygrunwald merged 2 commits intomainfrom
Conversation
The single ## Movies heading collapses the catalogue into a homogeneous list. Now that every entry carries a type, group them into three sections and skip the empty ones — today only Documentaries renders, but TV Series and Movies sections will appear automatically the moment a typed entry lands. The grouping happens once in convertJsonToReadme via a small groupMoviesByType helper that buckets each entry by its Type. Entries with an empty or out-of-set Type fall into Documentaries as a sensible default; validateCategoryAndType has already warned the maintainer at YAML→JSON time, so nothing here is silent. The per-entry rendering block (description / duration / language / type / category / tags / IMDb rating / YouTube likes / Watch on) is lifted into a named template "entry" so the three section bodies stay short and cannot drift apart over time. Visual change today: ## Movies becomes ## Documentaries; entries underneath unchanged.
Regenerate README.md with the new grouped layout. Single ## Documentaries section today; the TV Series and Movies sections appear automatically when typed entries land in the catalogue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The single `## Movies` heading becomes three: TV Series, Documentaries, Movies. Empty groups are hidden, so today's all-Documentary catalogue renders with one section; future typed entries pick up their bucket automatically.
Why
The `type` field on every entry was unused for layout. Grouping by it gives the README a clearer skeleton without any schema churn — and bakes in the right shape for upcoming biopics or docuseries.
What changed
Sample TOC (current catalogue)
```
Table of Contents
```
Mixed-type smoke test
Flipped one entry's `type` to `Movie` in its generated JSON, re-rendered: a `## Movies (1)` section appears below `## Documentaries (31)` in both TOC and body, the entry no longer shows up under Documentaries. Reverted before commit.
Test plan
Commit-by-commit
🤖 Generated with Claude Code