tecuts commited on
Commit
fbd5998
·
verified ·
1 Parent(s): 86fe38c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -98,8 +98,9 @@ async def get_track_download_url(track_id: str) -> str:
98
  continue
99
 
100
  logger.error(f"No download URL found")
101
- raise Exception("Download URL not found")
102
 
 
103
  @app.route('/track_dl', methods=['POST'])
104
  async def track_dl():
105
  track_id = request.json.get('track_id')
@@ -108,7 +109,7 @@ async def track_dl():
108
  result = {"url": dl_url}
109
  return jsonify(result)
110
  else:
111
- result = {"error": "failed to fetch the track"}
112
  return jsonify(result)
113
 
114
 
 
98
  continue
99
 
100
  logger.error(f"No download URL found")
101
+ return {"error":"Download URL not found"}
102
 
103
+
104
  @app.route('/track_dl', methods=['POST'])
105
  async def track_dl():
106
  track_id = request.json.get('track_id')
 
109
  result = {"url": dl_url}
110
  return jsonify(result)
111
  else:
112
+ result = {"error": "Failed to fetch the track"}
113
  return jsonify(result)
114
 
115