Remove logging and duplicate videos
All checks were successful
Build Docker image / test (push) Successful in 2m54s
Build Docker image / build (push) Successful in 1m14s

This commit is contained in:
Roman Krček
2025-05-06 20:24:22 +02:00
parent 8829caceee
commit 4b74810912

View File

@@ -129,9 +129,6 @@ async def save_tt_hashes(hashes: set) -> None:
async def check_if_tt_downloaded(tt_hash: str) -> bool:
all_tt_hashes = await get_tt_hashes()
log.info(f"All hashes: {all_tt_hashes}")
log.info(f"Hash to check: {tt_hash}")
log.info(f"Hash exists: {tt_hash in all_tt_hashes}")
return tt_hash in all_tt_hashes
@@ -153,9 +150,9 @@ async def download_tt_video(url: str) -> str:
log.info(f"{video_hash}")
log.info(f"{video_filepath}")
print(video_filepath)
if await check_if_tt_downloaded(video_hash) is True:
os.remove(video_filepath)
return "Already downloaded"
with open(video_filepath, "wb") as f: