Update subgen.py

This commit is contained in:
McCloudS
2024-03-05 08:48:40 -07:00
committed by GitHub
parent cfe287b3ec
commit 0ac49c0e4e

View File

@@ -99,18 +99,15 @@ def appendLine(result):
@app.get("/asr")
@app.get("/emby")
@app.get("/detect-language")
@app.get("/tautulli")
@app.get("/")
def handle_get_request(request: Request):
return "You accessed this request incorrectly via a GET request. See https://github.com/McCloudS/subgen for proper configuration"
return {"You accessed this request incorrectly via a GET request. See https://github.com/McCloudS/subgen for proper configuration"}
@app.get("/status")
def status():
return {"version" : f"Subgen {subgen_version}, stable-ts {stable_whisper.__version__}, whisper {whisper.__version__}"}
@app.post("/webhook")
async def print_warning():
return {"*** This is the legacy webhook. You need to update to webhook urls to end in plex, tautulli, emby, or jellyfin instead of webhook. ***"}
@app.post("/tautulli")
def receive_tautulli_webhook(
source: Union[str, None] = Header(None),