Mthrfkr commited on
Commit
e5be7a1
·
verified ·
1 Parent(s): ab5315b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -15
app.py CHANGED
@@ -1,18 +1,4 @@
1
- def get_track_isrc(token, track):
2
- """Get ISRC code for a track if not already present."""
3
- if track.get('external_ids', {}).get('isrc'):
4
- return track['external_ids']['isrc']
5
-
6
- # If track doesn't have ISRC, try to get it from the API
7
- if track.get('id'):
8
- headers = {'Authorization': f'Bearer {token}'}
9
- url = f'https://api.spotify.com/v1/tracks/{track["id"]}'
10
-
11
- response = make_request_with_retry(url, headers)
12
- if response and response.json().get('external_ids', {}).get('isrc'):
13
- return response.json()['external_ids']['isrc']
14
-
15
- return 'Not available'import gradio as gr
16
  import requests
17
  import pandas as pd
18
  import time
 
1
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  import requests
3
  import pandas as pd
4
  import time