Fixed lyrics download and version bump to 2.0.13

This commit is contained in:
RemixDev 2021-01-31 22:38:29 +01:00
parent e88d05015a
commit 2c9ed02394
No known key found for this signature in database
GPG key ID: B33962B465BDB51C
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3
__version__ = "2.0.12"
__version__ = "2.0.13"
USER_AGENT_HEADER = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) " \
"Chrome/79.0.3945.130 Safari/537.36"
VARIOUS_ARTISTS = "5080"

View file

@ -450,10 +450,10 @@ class DownloadJob:
writepath = filepath / f"{filename}{extensions[track.selectedFormat]}"
# Save lyrics in lrc file
if self.settings['syncedLyrics'] and track.lyrics['sync']:
if self.settings['syncedLyrics'] and track.lyrics.sync:
if not (filepath / f"{filename}.lrc").is_file() or self.settings['overwriteFile'] in [OverwriteOption.OVERWRITE, OverwriteOption.ONLY_TAGS]:
with open(filepath / f"{filename}.lrc", 'wb') as f:
f.write(track.lyrics['sync'].encode('utf-8'))
f.write(track.lyrics.sync.encode('utf-8'))
trackAlreadyDownloaded = writepath.is_file()

View file

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