mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
fix indentation and a parantheses error (#30)
Removed inconsistent use of space and tabs. Added parentheses in line 102
This commit is contained in:
committed by
Ritiek Malhotra
parent
a378d25e9f
commit
d03ea35416
22
spotdl.py
22
spotdl.py
@@ -99,17 +99,17 @@ def getLyrics():
|
|||||||
print('No log to read from..')
|
print('No log to read from..')
|
||||||
|
|
||||||
def fixSong():
|
def fixSong():
|
||||||
print 'Fixing meta-tags'
|
print ('Fixing meta-tags')
|
||||||
audiofile = eyed3.load("Music/" + title + '.mp3')
|
audiofile = eyed3.load("Music/" + title + '.mp3')
|
||||||
audiofile.tag.artist = content['artists'][0]['name']
|
audiofile.tag.artist = content['artists'][0]['name']
|
||||||
audiofile.tag.album = content['album']['name']
|
audiofile.tag.album = content['album']['name']
|
||||||
audiofile.tag.title = content['name']
|
audiofile.tag.title = content['name']
|
||||||
albumart = (requests.get(content['album']['images'][0]['url'], stream=True)).raw
|
albumart = (requests.get(content['album']['images'][0]['url'], stream=True)).raw
|
||||||
with open('last_albumart.jpg', 'wb') as out_file:
|
with open('last_albumart.jpg', 'wb') as out_file:
|
||||||
shutil.copyfileobj(albumart, out_file)
|
shutil.copyfileobj(albumart, out_file)
|
||||||
albumart = open("last_albumart.jpg", "rb").read()
|
albumart = open("last_albumart.jpg", "rb").read()
|
||||||
audiofile.tag.images.set(3,albumart,"image/jpeg")
|
audiofile.tag.images.set(3,albumart,"image/jpeg")
|
||||||
audiofile.tag.save(version=(2,3,0))
|
audiofile.tag.save(version=(2,3,0))
|
||||||
|
|
||||||
def playSong():
|
def playSong():
|
||||||
if not title == '':
|
if not title == '':
|
||||||
|
|||||||
Reference in New Issue
Block a user