Skip to content

Commit

Permalink
Update index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nattadasu authored Aug 7, 2023
1 parent e97a97f commit a95b379
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ def tmdb_exclusive_route(media_type: str, media_id: int, season_id: Union[str, N
@app.route("/<platform>", methods=["GET"])
@app.route("/<platform>.json", methods=["GET"])
@app.route("/<platform>()", methods=["GET"])
@app.route("/<platform>%28%29", methods=["GET"])
@app.route("/<platform>().json", methods=["GET"])
@app.route("/<platform>%28%29.json", methods=["GET"])
def platform_array(platform: str = "animeapi"):
"""
Platform array route, redirects to the raw JSON file on GitHub
Expand All @@ -216,7 +218,7 @@ def platform_array(platform: str = "animeapi"):
# remove .json if present
if route.endswith(".json"):
route = route.replace(".json", "")
if not route.endswith("()") and platform != "animeapi":
if not (route.endswith("()") or route.endswith("%28%29")) and platform != "animeapi":
platform = platform + "_object"
if platform == "syobocal":
platform = "shoboi"
Expand Down

0 comments on commit a95b379

Please sign in to comment.