test
This commit is contained in:
parent
4b91710ae7
commit
f4b4a09a8b
@ -95,6 +95,7 @@ class grab():
|
|||||||
|
|
||||||
class dropout():
|
class dropout():
|
||||||
def show(show, season, episode_start):
|
def show(show, season, episode_start):
|
||||||
|
logger.info(f'Received download request for: {show}')
|
||||||
directory = f'/tv/{show}/Season {season}/'
|
directory = f'/tv/{show}/Season {season}/'
|
||||||
if not os.path.exists(directory):
|
if not os.path.exists(directory):
|
||||||
os.makedirs(directory)
|
os.makedirs(directory)
|
||||||
|
|||||||
@ -96,13 +96,13 @@ async def dropoutSeries():
|
|||||||
|
|
||||||
@app.post("/dropout/download", description="Download an entire season from episode 1. Ignores behind the scenes and trailers.")
|
@app.post("/dropout/download", description="Download an entire season from episode 1. Ignores behind the scenes and trailers.")
|
||||||
async def dropoutDownload(
|
async def dropoutDownload(
|
||||||
request: Request,
|
# request: Request,
|
||||||
background_tasks: BackgroundTasks,
|
background_tasks: BackgroundTasks,
|
||||||
show: str = Form(...),
|
show: str = Form(...),
|
||||||
season: int = Form(...)
|
season: int = Form(...)
|
||||||
):
|
):
|
||||||
data = await request.json()
|
# data = await request.json()
|
||||||
logger.info(f"Parsed JSON Body: {json.dumps(data, indent=2)}")
|
# logger.info(f"Parsed JSON Body: {json.dumps(data, indent=2)}")
|
||||||
try:
|
try:
|
||||||
background_tasks.add_task(download.dropout.show,show,season,None)
|
background_tasks.add_task(download.dropout.show,show,season,None)
|
||||||
# download.dropout.show(show,season,episode)
|
# download.dropout.show(show,season,episode)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user