mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2025-07-01 23:33:11 +00:00
add check premium function in preperation
This commit is contained in:
parent
090e27dbdf
commit
a52118b7d8
@ -234,6 +234,14 @@ def getSongInfo(songId):
|
|||||||
|
|
||||||
return artists, albumName, name, imageUrl, releaseYear, disc_number, track_number, scrapedSongId, isPlayAble
|
return artists, albumName, name, imageUrl, releaseYear, disc_number, track_number, scrapedSongId, isPlayAble
|
||||||
|
|
||||||
|
def checkPremium(access_token):
|
||||||
|
headers = {'Authorization': f'Bearer {access_token}'}
|
||||||
|
resp = requests.get('https://api.spotify.com/v1/me', headers=headers).json()
|
||||||
|
if resp["product"] == "premium":
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Functions directly related to modifying the downloaded audio and its metadata
|
#Functions directly related to modifying the downloaded audio and its metadata
|
||||||
|
Loading…
x
Reference in New Issue
Block a user