This commit is contained in:
TylerCG 2025-04-22 22:41:22 -04:00
parent 122d7b6ffe
commit f7239a90f1
2 changed files with 9 additions and 7 deletions

View File

@ -69,12 +69,10 @@ class dropout():
'writesubtitles': True, # Download subtitles
'subtitleslangs': ['en'] # Specify the language for subtitles (e.g., 'en' for English)
}
try:
with yt_dlp.YoutubeDL(dl_ops) as ydl:
ydl.download([url])
return JSONResponse(status_code=200, content={"status": "success", "message": "Download completed."})
except Exception as e:
return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})
def series():
json_data=[]

View File

@ -32,7 +32,11 @@ async def dropoutSeries():
@app.post("/dropoutDownload")
async def dropoutDownload(show: str, season: str, episode: str = None):
try:
download.dropout.show(show,season,episode)
return JSONResponse(status_code=200, content={"status": "success", "message": "Series downloading."})
except Exception as e:
return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})
@app.post("/ydl")
async def ydl(url: str, location: str):