Fixed playlist cover downloading and spotify playlist size
This fixes #8 again
This commit is contained in:
parent
c65b85631b
commit
ffb803cf3c
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
__version__ = "1.1.25"
|
||||
__version__ = "1.1.26"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue