Fixed playlist cover downloading and spotify playlist size

This fixes #8 again
This commit is contained in:
RemixDev
2020-07-30 19:37:10 +02:00
parent c65b85631b
commit ffb803cf3c
4 changed files with 4 additions and 3 deletions

View File

@ -1031,7 +1031,7 @@ def after_download(tracks, settings, queueItem):
with open(os.path.join(extrasPath, 'errors.txt'), 'wb') as f:
f.write(errors.encode('utf-8'))
if settings['saveArtwork'] and playlistCover and not settings['tags']['savePlaylistAsCompilation']:
for image in result['playlistURLs']:
for image in playlistURLs:
downloadImage(image['url'], os.path.join(extrasPath, playlistCover)+f".{image['ext']}", settings['overwriteFile'])
if settings['logSearched'] and searched != "":
with open(os.path.join(extrasPath, 'searched.txt'), 'wb') as f:

View File

@ -205,6 +205,7 @@ class SpotifyHelper:
if item['track']:
tracklist.append(item['track'])
totalSize = len(tracklist)
result['size'] = totalSize
if path.isfile(path.join(self.configFolder, 'spotifyCache.json')):
with open(path.join(self.configFolder, 'spotifyCache.json'), 'r') as spotifyCache:
cache = json.load(spotifyCache)