ChandimaPrabath commited on
Commit
6dcf562
1 Parent(s): 5eee105
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from fastapi.responses import JSONResponse, FileResponse
2
  from fastapi import FastAPI, HTTPException, Request
3
  from threading import Thread
4
  from Instance import Instance
@@ -50,7 +50,6 @@ async def serve_video(file_path: str, request: Request):
50
  # Fallback for serving the whole file if no range requested
51
  return FileResponse(file_path)
52
 
53
-
54
  @app.get("/")
55
  async def index():
56
  return instance.version
@@ -70,13 +69,6 @@ async def get_film_store_api():
70
  """Endpoint to get the TV store JSON."""
71
  return JSONResponse(instance.FILM_STORE)
72
 
73
- from fastapi import FastAPI, HTTPException, Request, Response
74
- from fastapi.responses import FileResponse
75
- import os
76
- from threading import Thread
77
-
78
- app = FastAPI()
79
-
80
  @app.get("/api/get/film/{title}")
81
  async def get_movie_api(request: Request, title: str):
82
  """Endpoint to get the movie by title with support for range requests."""
 
1
+ from fastapi.responses import JSONResponse, FileResponse, Response
2
  from fastapi import FastAPI, HTTPException, Request
3
  from threading import Thread
4
  from Instance import Instance
 
50
  # Fallback for serving the whole file if no range requested
51
  return FileResponse(file_path)
52
 
 
53
  @app.get("/")
54
  async def index():
55
  return instance.version
 
69
  """Endpoint to get the TV store JSON."""
70
  return JSONResponse(instance.FILM_STORE)
71
 
 
 
 
 
 
 
 
72
  @app.get("/api/get/film/{title}")
73
  async def get_movie_api(request: Request, title: str):
74
  """Endpoint to get the movie by title with support for range requests."""