ChandimaPrabath commited on
Commit
f2b5a4c
·
1 Parent(s): 1c208c5

genre update

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -126,9 +126,9 @@ async def get_genre_items(
126
  # Get sorted entries based on genres and media type
127
  entries = genre_list.get_entries_by_multiple_genres(genre, media_type=media_type)
128
 
129
- # Separate entries by media type
130
- movies = [entry for entry in entries if entry[4] == 'movie']
131
- series = [entry for entry in entries if entry[4] == 'series']
132
 
133
  # Calculate pagination
134
  start = (page - 1) * limit
@@ -151,6 +151,7 @@ async def get_genre_items(
151
  # Return the results in a JSON response
152
  return JSONResponse(content=results)
153
 
 
154
  @app.get("/api/get/movie/metadata/{title}")
155
  async def get_movie_metadata_api(title: str):
156
  """Endpoint to get the movie metadata by title."""
 
126
  # Get sorted entries based on genres and media type
127
  entries = genre_list.get_entries_by_multiple_genres(genre, media_type=media_type)
128
 
129
+ # Separate entries by media type and include only the title
130
+ movies = [{'title': entry[0]} for entry in entries if entry[4] == 'movie']
131
+ series = [{'title': entry[0]} for entry in entries if entry[4] == 'series']
132
 
133
  # Calculate pagination
134
  start = (page - 1) * limit
 
151
  # Return the results in a JSON response
152
  return JSONResponse(content=results)
153
 
154
+
155
  @app.get("/api/get/movie/metadata/{title}")
156
  async def get_movie_metadata_api(title: str):
157
  """Endpoint to get the movie metadata by title."""