Jonell01 commited on
Commit
bc10642
·
verified ·
1 Parent(s): c057626

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -5
main.py CHANGED
@@ -37,11 +37,11 @@ class SpotDLServer(BaseHTTPRequestHandler):
37
 
38
  try:
39
  subprocess.run(
40
- ["spotdl", url, "--output", DOWNLOAD_DIR + "/"],
41
- check=True,
42
- stdout=subprocess.DEVNULL,
43
- stderr=subprocess.DEVNULL
44
- )
45
 
46
  after_files = set(os.listdir(DOWNLOAD_DIR))
47
  new_files = list(after_files - before_files)
 
37
 
38
  try:
39
  subprocess.run(
40
+ ["spotdl", url, "--output", f"{DOWNLOAD_DIR}/%(title)s.%(ext)s"],
41
+ check=True,
42
+ stdout=subprocess.DEVNULL,
43
+ stderr=subprocess.DEVNULL
44
+ )
45
 
46
  after_files = set(os.listdir(DOWNLOAD_DIR))
47
  new_files = list(after_files - before_files)