Fixed track download without lyrics

This commit is contained in:
RemixDev 2020-08-16 13:25:25 +02:00
parent c067ff598e
commit af06d963da
2 changed files with 3 additions and 3 deletions

View File

@ -366,7 +366,7 @@ class DownloadJob:
writepath = os.path.join(filepath, filename + extensions[track.selectedFormat])
# Save lyrics in lrc file
if self.settings['syncedLyrics'] and 'sync' in track.lyrics:
if self.settings['syncedLyrics'] and track.lyrics['sync']:
if not os.path.isfile(os.path.join(filepath, filename + '.lrc')) or settings['overwriteFile'] in ['y', 't']:
with open(os.path.join(filepath, filename + '.lrc'), 'wb') as f:
f.write(track.lyrics['sync'].encode('utf-8'))

View File

@ -60,7 +60,7 @@ def tagID3(stream, track, save):
tag.add(TXXX(desc="ITUNESADVISORY", text="1" if track.explicit else "0"))
if save['replayGain']:
tag.add(TXXX(desc="REPLAYGAIN_TRACK_GAIN", text=track.replayGain))
if 'unsync' in track.lyrics and save['lyrics']:
if track.lyrics['unsync'] and save['lyrics']:
tag.add(USLT(text=track.lyrics['unsync']))
involved_people = []
@ -143,7 +143,7 @@ def tagFLAC(stream, track, save):
tag["ITUNESADVISORY"] = "1" if track.explicit else "0"
if save['replayGain']:
tag["REPLAYGAIN_TRACK_GAIN"] = track.replayGain
if 'unsync' in track.lyrics and save['lyrics']:
if track.lyrics['unsync'] and save['lyrics']:
tag["LYRICS"] = track.lyrics['unsync']
for role in track.contributors: