diff --git a/api/main.py b/api/main.py index a2e2febb..00adc6d6 100644 --- a/api/main.py +++ b/api/main.py @@ -4,6 +4,7 @@ from partial import PartialFileResponse from uvicorn import run from os.path import join +from os import listdir from urllib.request import urlopen from subprocess import run as bash from db import db @@ -109,6 +110,10 @@ def cancelRender(): def getProjects(user: User = Depends(get_current_active_user)): return ['demo.csv', 'external.csv', 'moon.csv', 'train.csv', 'xmas.csv'] +@app.get('/videos') +async def getVideos(): + return listdir('videos') + @app.get('/videos/{video}', responses={ 206: {'content': {'video/mp4': {}}, 'description': 'partial video response'}