finalized logging

This commit is contained in:
TylerCG 2025-05-12 17:21:42 -04:00
parent 6d7b115268
commit 31bd8871b4
2 changed files with 3 additions and 1 deletions

View File

@ -108,6 +108,7 @@ class grab():
class dropout():
def show(show, season, episode_start):
logger.info(f'message=Received download request for season {season} of {show}.')
directory = f'/tv/{show}/Season {season}/'
if not os.path.exists(directory):
os.makedirs(directory)
@ -172,6 +173,7 @@ class dropout():
ydl.download([entry['webpage_url']])
def specials(show, season, episode_start):
logger.info(f'message=Received download request for specials of season {season} of {show}.')
directory = f'/tv/{show}/Specials/'
if not os.path.exists(directory):
os.makedirs(directory)
@ -272,6 +274,7 @@ class dropout():
class youtube():
def ydl(url, location):
logger.info(f'message=Received download request for {url}.')
dl_ops = {
'progress_hooks': [my_hook],
'download_archive': '/data/logs/youtube.archive.text',

View File

@ -101,7 +101,6 @@ async def dropoutDownload(
show: str = Form(...),
season: int = Form(...)
):
logger.info(f'Received download request for: {show}')
try:
background_tasks.add_task(download.dropout.show,show,season,None)
# download.dropout.show(show,season,episode)