Remove logging and duplicate videos
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user