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
|
#!/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:
|
with open(os.path.join(extrasPath, 'errors.txt'), 'wb') as f:
|
||||||
f.write(errors.encode('utf-8'))
|
f.write(errors.encode('utf-8'))
|
||||||
if settings['saveArtwork'] and playlistCover and not settings['tags']['savePlaylistAsCompilation']:
|
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'])
|
downloadImage(image['url'], os.path.join(extrasPath, playlistCover)+f".{image['ext']}", settings['overwriteFile'])
|
||||||
if settings['logSearched'] and searched != "":
|
if settings['logSearched'] and searched != "":
|
||||||
with open(os.path.join(extrasPath, 'searched.txt'), 'wb') as f:
|
with open(os.path.join(extrasPath, 'searched.txt'), 'wb') as f:
|
||||||
|
|
|
@ -205,6 +205,7 @@ class SpotifyHelper:
|
||||||
if item['track']:
|
if item['track']:
|
||||||
tracklist.append(item['track'])
|
tracklist.append(item['track'])
|
||||||
totalSize = len(tracklist)
|
totalSize = len(tracklist)
|
||||||
|
result['size'] = totalSize
|
||||||
if path.isfile(path.join(self.configFolder, 'spotifyCache.json')):
|
if path.isfile(path.join(self.configFolder, 'spotifyCache.json')):
|
||||||
with open(path.join(self.configFolder, 'spotifyCache.json'), 'r') as spotifyCache:
|
with open(path.join(self.configFolder, 'spotifyCache.json'), 'r') as spotifyCache:
|
||||||
cache = json.load(spotifyCache)
|
cache = json.load(spotifyCache)
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ README = (HERE / "README.md").read_text()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="deemix",
|
name="deemix",
|
||||||
version="1.1.25",
|
version="1.1.26",
|
||||||
description="A barebone deezer downloader library",
|
description="A barebone deezer downloader library",
|
||||||
long_description=README,
|
long_description=README,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
|
Loading…
Reference in New Issue