abe-101 / tube-cast

A command-line tool that converts YouTube videos into Anchor FM podcasts
https://pypi.org/project/tube-cast/
MIT License
13 stars 2 forks source link

This else statment was redundant I believe :^) #19

Closed ColtenMikulastik closed 2 years ago

abe-101 commented 2 years ago

The documentation on ytd-dlp is very limited The code is coppied from this reddit comment https://www.reddit.com/r/youtubedl/comments/skgjon/is_there_a_better_guide_to_using_ytdlp_with_python/iagu3bg/

ColtenMikulastik commented 2 years ago

I'm afk rn, but I just thought of a solution. The problem is that the "hasattr" func should be called out of the if block, so you can check both the message member and it's value all at once, instead of using two if statements.

ColtenMikulastik commented 2 years ago

You actually do need that hanging else statement. I would revert because my solution has a logical error. Sorry my bad.

abe-101 commented 2 years ago

You actually do need that hanging else statement. I would revert because my solution has a logical error. Sorry my bad.

No worries I haven't yet merged this into main.