Skip to content

Commit

Permalink
fix windows path makedirs error
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixthrush authored Apr 19, 2024
1 parent 79aabf0 commit d997cd0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,12 @@ def download_with_ytdlp(url, series):
if options.link_only:
print(url)
shutdown()
try:

os = platform()
if os == "Windows":
makedirs(f"Downloads\\{series.series}", exist_ok=True)
else:
makedirs(f"Downloads/{series.series}", exist_ok=True)
except FileExistsError as e:
print("Error creating directory:", e)

try:
yt_opts = {
Expand Down

0 comments on commit d997cd0

Please sign in to comment.