mirror of
				https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
				synced 2025-10-31 11:41:30 +00:00 
			
		
		
		
	Merge pull request #16 from DeadSix27/patch-1
fix KeyError in premium check
This commit is contained in:
		
						commit
						4d63a651bc
					
				| @ -249,7 +249,7 @@ def getSongInfo(songId): | ||||
| 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": | ||||
|     if "product" in resp and resp["product"] == "premium": | ||||
|         return True | ||||
|     else: | ||||
|         return False | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Footsiefat
						Footsiefat