Skip to content

Commit

Permalink
Prevent empty folder from being created when dumping JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Resch committed Oct 31, 2024
1 parent f2beda1 commit 7d41ad4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spotify_dl/spotify_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def spotify_dl():
url_dict["save_path"] = Path(
PurePath.joinpath(Path(args.output), Path(directory_name))
)
url_dict["save_path"].mkdir(parents=True, exist_ok=True)
#Prevent empty folder from being created when dumping JSON
if args.dump_json is False:
url_dict["save_path"].mkdir(parents=True, exist_ok=True)
console.print(
f"Saving songs to [bold green]{directory_name}[/bold green] directory"
)
Expand Down

0 comments on commit 7d41ad4

Please sign in to comment.