Fixed track download without lyrics
This commit is contained in:
parent
c067ff598e
commit
af06d963da
|
@ -366,7 +366,7 @@ class DownloadJob:
|
||||||
writepath = os.path.join(filepath, filename + extensions[track.selectedFormat])
|
writepath = os.path.join(filepath, filename + extensions[track.selectedFormat])
|
||||||
|
|
||||||
# Save lyrics in lrc file
|
# 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']:
|
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:
|
with open(os.path.join(filepath, filename + '.lrc'), 'wb') as f:
|
||||||
f.write(track.lyrics['sync'].encode('utf-8'))
|
f.write(track.lyrics['sync'].encode('utf-8'))
|
||||||
|
|
|
@ -60,7 +60,7 @@ def tagID3(stream, track, save):
|
||||||
tag.add(TXXX(desc="ITUNESADVISORY", text="1" if track.explicit else "0"))
|
tag.add(TXXX(desc="ITUNESADVISORY", text="1" if track.explicit else "0"))
|
||||||
if save['replayGain']:
|
if save['replayGain']:
|
||||||
tag.add(TXXX(desc="REPLAYGAIN_TRACK_GAIN", text=track.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']))
|
tag.add(USLT(text=track.lyrics['unsync']))
|
||||||
|
|
||||||
involved_people = []
|
involved_people = []
|
||||||
|
@ -143,7 +143,7 @@ def tagFLAC(stream, track, save):
|
||||||
tag["ITUNESADVISORY"] = "1" if track.explicit else "0"
|
tag["ITUNESADVISORY"] = "1" if track.explicit else "0"
|
||||||
if save['replayGain']:
|
if save['replayGain']:
|
||||||
tag["REPLAYGAIN_TRACK_GAIN"] = track.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']
|
tag["LYRICS"] = track.lyrics['unsync']
|
||||||
|
|
||||||
for role in track.contributors:
|
for role in track.contributors:
|
||||||
|
|
Loading…
Reference in New Issue