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

@ -1,3 +1,3 @@
#!/usr/bin/env python3
__version__ = "1.1.25"
__version__ = "1.1.26"

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)

View File

@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
setup(
name="deemix",
version="1.1.25",
version="1.1.26",
description="A barebone deezer downloader library",
long_description=README,
long_description_content_type="text/markdown",