pengdaqian commited on
Commit
cdf789d
·
1 Parent(s): b4d25e3
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -239,18 +239,19 @@ def auto_search(name):
239
  config = {'logfilepath': 'musicdl.log', save_music_path: save_music_path, 'search_size_per_source': 5, 'proxies': {}}
240
  save_path = os.path.join(save_music_path, name + '.mp3')
241
  # youtube
242
- task1 = threading.Thread(
243
- target=get_youtube,
244
- args=(name, os.path.join(save_music_path, name))
245
- )
246
- task1.start()
247
- task2 = threading.Thread(
248
- target=download_random,
249
- args=(name, config, save_path)
250
- )
251
- task2.start()
252
- task1.join(timeout=20)
253
- task2.join(timeout=10)
 
254
 
255
  if not os.path.exists(save_path):
256
  return "Not Found", None
 
239
  config = {'logfilepath': 'musicdl.log', save_music_path: save_music_path, 'search_size_per_source': 5, 'proxies': {}}
240
  save_path = os.path.join(save_music_path, name + '.mp3')
241
  # youtube
242
+ get_youtube(name, os.path.join(save_music_path, name))
243
+ # task1 = threading.Thread(
244
+ # target=get_youtube,
245
+ # args=(name, os.path.join(save_music_path, name))
246
+ # )
247
+ # task1.start()
248
+ # task2 = threading.Thread(
249
+ # target=download_random,
250
+ # args=(name, config, save_path)
251
+ # )
252
+ # task2.start()
253
+ # task1.join(timeout=20)
254
+ # task2.join(timeout=10)
255
 
256
  if not os.path.exists(save_path):
257
  return "Not Found", None