Skip to content

Conversation

@ddx-510
Copy link

@ddx-510 ddx-510 commented Dec 7, 2025

Summary

This PR adds comprehensive genre API support, allowing users to fetch genre lists and filter movies by single or multiple genres using JavBus's native format.

Features Added

  • GET /api/genres - Get all genres with optional counts
  • GET /api/genres/{genreId} - Get movies for a specific genre
  • Support for multiple genre combinations using JavBus native format (e.g., /api/genres/62-4r for genres 62 AND 4r)

Changes Made

  • Added getAllGenres() function to fetch and parse genre listings from /genre page
  • Added getGenreMovies() function to fetch movies filtered by genre(s)
  • Added genre router with endpoints
  • Updated types to include Genre interface
  • Exported baseMoviesPageValidator for reuse
  • Updated README with complete genre API documentation

Example Usagesh

Get all genres

GET /api/genres

Get movies for a single genre

GET /api/genres/7w

Get movies matching multiple genres (JavBus native format)

GET /api/genres/62-4r## Testing

  • ✅ Single genre filtering works
  • ✅ Multiple genre combinations work (using JavBus dash-separated format)
  • ✅ Genre listing works
  • ✅ Documentation updated with examples

@vercel
Copy link

vercel bot commented Dec 7, 2025

@ddx-510 is attempting to deploy a commit to the ovnrain's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ddx-510 ddx-510 changed the title Feat/genres api feat: Add genres API endpoints Dec 7, 2025
@ovnrain
Copy link
Owner

ovnrain commented Dec 7, 2025

I will review this PR when I have time. Please wait, and thank you for your support.

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.

2 participants